آخر نشاط 1 month ago

Taken from https://gist.github.com/shakahl/d629dbe9d41f57699dba597929582c9f

anthony's Avatar anthony عدّل هذا المقطع 1 year ago. الانتقال إلى التعديل

1 file changed

gistfile1.txt تم تغيير الاسم إلى get_latest_release.sh

تم تغيير اسم الملف بدون تغييرات

anthony's Avatar anthony عدّل هذا المقطع 1 year ago. الانتقال إلى التعديل

1 file changed, 6 insertions

gistfile1.txt(تم إنشاء الملف)

@@ -0,0 +1,6 @@
1 + #!/bin/bash
2 + get_latest_release() {
3 + curl --silent "https://api.github.com/repos/$1/releases/latest" | # Get latest release from GitHub api
4 + grep '"tag_name":' | # Get tag line
5 + sed -E 's/.*"([^"]+)".*/\1/' # Pluck JSON value
6 + }
أحدث أقدم