Merge pull request #910 from shunf4/master

Fix working directory of retrieval of git revision in win32 installer build script
This commit is contained in:
Eric Le Lay 2020-11-30 21:05:07 +01:00 committed by GitHub
commit e78f54b0cb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 4 deletions

View File

@ -145,8 +145,8 @@ function install_gpodder {
GPO_VERSION_DESC="$GPO_VERSION"
if [ "$1" = "master" ]
then
local GIT_REV=$(git rev-list --count HEAD)
local GIT_HASH=$(git rev-parse --short HEAD)
local GIT_REV=$(cd "${REPO_CLONE}" && git rev-list --count HEAD)
local GIT_HASH=$(cd "${REPO_CLONE}" && git rev-parse --short HEAD)
GPO_VERSION_DESC="$GPO_VERSION-rev$GIT_REV-$GIT_HASH"
fi
@ -439,7 +439,7 @@ function build_installer {
cp "${REPO_CLONE}"/src/gpodder/build_info.py "$BUILDPY"
echo 'BUILD_TYPE = u"windows"' >> "$BUILDPY"
echo "BUILD_VERSION = $BUILD_VERSION" >> "$BUILDPY"
(cd "$REPO_CLONE" && echo "BUILD_INFO = u\"$(git rev-parse --short HEAD)\"" >> "$BUILDPY")
(cd "$REPO_CLONE" && echo "BUILD_INFO = u\"$(cd "${REPO_CLONE}" && git rev-parse --short HEAD)\"" >> "$BUILDPY")
(cd $(dirname "$BUILDPY") && build_compileall -d "" -q -f -l .)
rm -f "$BUILDPY"
@ -454,7 +454,7 @@ function build_portable_installer {
cp "${REPO_CLONE}"/src/gpodder/build_info.py "$BUILDPY"
echo 'BUILD_TYPE = u"windows-portable"' >> "$BUILDPY"
echo "BUILD_VERSION = $BUILD_VERSION" >> "$BUILDPY"
(cd "$REPO_CLONE" && echo "BUILD_INFO = u\"$(git rev-parse --short HEAD)\"" >> "$BUILDPY")
(cd "$REPO_CLONE" && echo "BUILD_INFO = u\"$(cd "${REPO_CLONE}" && git rev-parse --short HEAD)\"" >> "$BUILDPY")
(cd $(dirname "$BUILDPY") && build_compileall -d "" -q -f -l .)
rm -f "$BUILDPY"