correct way to check for new version

Have to “git fetch origin” to pull latest changes into local tree
before “git show origin:Makefile” will have latest Makefile with
current version number. Otherwise the origin is stuck at the current
revision.
pull/419/head
jks-prv 2020-08-11 08:50:33 +12:00
parent 50c855788b
commit b1050c1ed5
3 changed files with 4 additions and 3 deletions

View File

@ -1099,7 +1099,8 @@ git:
git pull -v $(GIT_PROTO)://github.com/jks-prv/Beagle_SDR_GPS.git
update_check:
git show master:Makefile > Makefile.1
git fetch origin
git show origin:Makefile > Makefile.1
diff Makefile Makefile.1 | head
force_update:

View File

@ -104,7 +104,8 @@ static void update_build_ctask(void *param)
static void curl_makefile_ctask(void *param)
{
int status = system("cd /root/" REPO_NAME " ; echo ======== checking for update >/root/build.log; date >>/root/build.log; " \
"git show master:Makefile >Makefile.1 2>>/root/build.log");
"git fetch origin >>/root/build.log 2>&1; " \
"git show origin:Makefile >Makefile.1 2>>/root/build.log");
child_status_exit(status);
system("cd /root/" REPO_NAME " ; diff Makefile Makefile.1 >>/root/build.log");

1
up
View File

@ -14,7 +14,6 @@ if test "x$KIWI_CONSOLE" = "xyes" ; then
fi
make stop
git show master:Makefile > Makefile
git clean -fd
git checkout .
git pull -v