2022-07-29 09:30:16 -04:00
|
|
|
#!/bin/bash
|
2019-12-02 18:58:50 -05:00
|
|
|
|
|
|
|
set -ex
|
|
|
|
|
|
|
|
BRANCH=$(git rev-parse --abbrev-ref HEAD)
|
2022-07-29 09:30:16 -04:00
|
|
|
DIST_VERSION=$(git describe --abbrev=0 --tags)
|
2019-12-02 18:58:50 -05:00
|
|
|
|
2022-07-29 09:30:16 -04:00
|
|
|
DIR=$(dirname "$0")
|
|
|
|
|
|
|
|
# If we're not using custom SDKs and on a branch other than master, generate a version akin go develop.element.io
|
|
|
|
if [[ $USE_CUSTOM_SDKS == false ]] && [[ $BRANCH != 'master' ]]
|
2019-12-02 18:58:50 -05:00
|
|
|
then
|
2022-07-29 09:30:16 -04:00
|
|
|
DIST_VERSION=$("$DIR"/get-version-from-git.sh)
|
2019-12-02 18:58:50 -05:00
|
|
|
fi
|
|
|
|
|
2022-07-29 09:30:16 -04:00
|
|
|
DIST_VERSION=$("$DIR"/normalize-version.sh "$DIST_VERSION")
|
2021-12-06 23:11:01 -05:00
|
|
|
VERSION=$DIST_VERSION yarn build
|
2022-07-29 09:30:16 -04:00
|
|
|
echo "$DIST_VERSION" > /src/webapp/version
|