mirror of
https://github.com/element-hq/element-web.git
synced 2024-12-19 18:52:08 +03:00
d36cfc37e2
* Make the version file part of webpack output Signed-off-by: Michael Telatynski <7t3chguy@gmail.com> * Fix outputFile path for Windows compat Signed-off-by: Michael Telatynski <7t3chguy@gmail.com> --------- Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
19 lines
583 B
Bash
Executable file
19 lines
583 B
Bash
Executable file
#!/usr/bin/env bash
|
|
|
|
set -ex
|
|
|
|
BRANCH=$(git rev-parse --abbrev-ref HEAD)
|
|
DIST_VERSION=$(git describe --abbrev=0 --tags)
|
|
|
|
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
|
|
DIST_VERSION=$("$DIR"/get-version-from-git.sh)
|
|
fi
|
|
|
|
DIST_VERSION=$("$DIR"/normalize-version.sh "$DIST_VERSION")
|
|
VERSION=$DIST_VERSION yarn build
|