1
0
Fork 0
mirror of https://github.com/Ysurac/openmptcprouter.git synced 2025-03-09 15:40:20 +00:00

add function to get latest commit

This commit is contained in:
user747 2019-12-12 01:15:32 -05:00 committed by GitHub
parent a4499b4fb0
commit 03839e9fb6
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -19,6 +19,10 @@ _get_repo() (
git checkout -f "origin/$3" -B "build" 2>/dev/null || git checkout "$3" -B "build" git checkout -f "origin/$3" -B "build" 2>/dev/null || git checkout "$3" -B "build"
) )
_get_lastcommit() (
curl -s https://api.github.com/repos/"${1}"/commits?per_page=1 | awk -F'"' 'NR==3{print $4}'
)
OMR_DIST=${OMR_DIST:-openmptcprouter} OMR_DIST=${OMR_DIST:-openmptcprouter}
OMR_HOST=${OMR_HOST:-$(curl -sS ifconfig.co)} OMR_HOST=${OMR_HOST:-$(curl -sS ifconfig.co)}
OMR_PORT=${OMR_PORT:-8000} OMR_PORT=${OMR_PORT:-8000}