Files
element-web/scripts/docker-package.sh
T

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

20 lines
583 B
Bash
Raw Normal View History

#!/usr/bin/env bash
set -ex
BRANCH=$(git rev-parse --abbrev-ref HEAD)
2022-07-29 14:30:16 +01:00
DIST_VERSION=$(git describe --abbrev=0 --tags)
2022-07-29 14:30:16 +01:00
DIR=$(dirname "$0")
# If the branch comes out as HEAD then we're probably checked out to a tag, so if the thing is *not*
# coming out as HEAD then we're on a branch. When we're on a branch, we want to resolve ourselves to
# a few SHAs rather than a version.
if [[ $BRANCH != HEAD && ! $BRANCH =~ heads/v.+ ]]
then
2022-07-29 14:30:16 +01:00
DIST_VERSION=$("$DIR"/get-version-from-git.sh)
fi
2022-07-29 14:30:16 +01:00
DIST_VERSION=$("$DIR"/normalize-version.sh "$DIST_VERSION")
2021-12-07 15:11:01 +11:00
VERSION=$DIST_VERSION yarn build