You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@apisix.apache.org by GitBox <gi...@apache.org> on 2021/01/02 03:23:17 UTC

[GitHub] [apisix-dashboard] imjoey commented on a change in pull request #1162: fix: correct Version and GitHash output for manager-api command

imjoey commented on a change in pull request #1162:
URL: https://github.com/apache/apisix-dashboard/pull/1162#discussion_r550837060



##########
File path: api/build.sh
##########
@@ -20,6 +20,7 @@ export ENV=local
 pwd=`pwd`
 
 VERSION=$(cat ./api/VERSION)
+GITHASH=$(cat ./.githash 2> /dev/null || git log --pretty=format:"%h" -1)

Review comment:
       @nic-chen good catch. Thanks. Especially in docker environment, the dependency of `git` command would definitely increase the size of image. Inspired by https://stackoverflow.com/questions/949314/how-to-retrieve-the-hash-for-the-current-commit-in-git , I borrow the awesome script here. Test passed in my local environment. Any feedback is welcome. Thanks.




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org