Skip to content

Windows Installer Build Script: GIT_REV and GIT_HASH may be wrong when master branch is selected #906

@shunf4

Description

@shunf4

(cd "${REPO_CLONE}" && git checkout "$1") || exit 1
(cd "${REPO_CLONE}" && PYTHON="${MINGW_ROOT}"/bin/python3.exe mingw32-make install-win)
GPO_VERSION=$(MSYSTEM= build_python -c \
"import gpodder; import sys; sys.stdout.write(gpodder.__version__)")
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)
GPO_VERSION_DESC="$GPO_VERSION-rev$GIT_REV-$GIT_HASH"
fi

currently checked out branch (git rev-parse --short HEAD) is possibly different from that in ${REPO_CLONE} (which is master), so it's possible that $GIT_REV and $GIT_HASH are wrong during installer build.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions