2022-11-09 09:58:06 -05:00
|
|
|
#!/usr/bin/env bash
|
2019-12-02 16:58:50 -07:00
|
|
|
|
|
|
|
|
set -ex
|
|
|
|
|
|
|
|
|
|
BRANCH=$(git rev-parse --abbrev-ref HEAD)
|
|
|
|
|
|
2022-07-29 14:30:16 +01:00
|
|
|
DIR=$(dirname "$0")
|
|
|
|
|
|
2022-09-05 09:35:16 +01:00
|
|
|
# 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.+ ]]
|
2019-12-02 16:58:50 -07:00
|
|
|
then
|
2022-07-29 14:30:16 +01:00
|
|
|
DIST_VERSION=$("$DIR"/get-version-from-git.sh)
|
2025-04-10 07:59:44 +00:00
|
|
|
else
|
|
|
|
|
DIST_VERSION=$(git describe --abbrev=0 --tags)
|
2019-12-02 16:58:50 -07:00
|
|
|
fi
|
|
|
|
|
|
2022-07-29 14:30:16 +01:00
|
|
|
DIST_VERSION=$("$DIR"/normalize-version.sh "$DIST_VERSION")
|
2025-11-03 16:26:47 +00:00
|
|
|
|
2026-02-24 15:47:28 +00:00
|
|
|
VERSION=$DIST_VERSION pnpm --dir apps/web build
|