mirror of
https://github.com/dani-garcia/bw_web_builds.git
synced 2024-10-31 14:54:48 +03:00
6529f1dab0
- Updated web-vault to v2022.05.0 - Made several changes to the build scripts for ease of building/patching etc... You can now run `make checkout` to pull/update the repo to the wanted version There is also a `make patch-web-vault` to patch the repo A `make generate-patch` to create a patch file from the current changes And many more changes
35 lines
874 B
Bash
Executable file
35 lines
874 B
Bash
Executable file
#!/usr/bin/env bash
|
|
set -o pipefail -o errexit
|
|
BASEDIR=$(dirname "$(readlink -f "$0")")
|
|
|
|
# Error handling
|
|
handle_error() {
|
|
read -n1 -r -p "FAILED: line $1, exit code $2. Press any key to exit..." _
|
|
exit 1
|
|
}
|
|
trap 'handle_error $LINENO $?' ERR
|
|
|
|
# Load default script environment variables
|
|
# shellcheck source=.script_env
|
|
. "${BASEDIR}/.script_env"
|
|
|
|
pushd "${VAULT_FOLDER}"
|
|
|
|
# Show used versions
|
|
node --version
|
|
npm --version
|
|
|
|
# Build
|
|
npm ci
|
|
npm audit fix || true
|
|
npm run dist:oss:selfhost
|
|
|
|
# Delete debugging map files, optional
|
|
#find build -name "*.map" -delete
|
|
|
|
# Create vw-version.json with the latest tag from the remote repo.
|
|
printf '{"version":"%s"}' \
|
|
"$(git -c 'versionsort.suffix=-' ls-remote --tags --sort='v:refname' https://github.com/dani-garcia/bw_web_builds.git 'v*' | tail -n1 | sed -E 's#.*?refs/tags/v##')" \
|
|
> build/vw-version.json
|
|
|
|
popd
|