vault/enos/modules/build_local/scripts/build.sh
Vault Automation 12e793039a
[UI] - migrate to pnpm for JS package management (#11651) (#11661)
* move from yarn to pnpm for package management

* remove lodash.template patch override

* remove .yarn folder

* update GHA to use pnpm

* add @babel/plugin-proposal-decorators

* remove .yarnrc.yml

* add lock file to copywrite ignore

* add @codemirror/view as a dep for its types

* use more strict setting about peerDeps

* address some peerDep issues with ember-power-select and ember-basic-dropdown

* enable TS compilation for the kubernetes engine

* enable TS compilation in kv engine

* ignore workspace file

* use new headless mode in CI

* update enos CI scenarios

* add qs and express resolutions

* run 'pnpm up glob' and 'pnpm up js-yaml' to upgrade those packages

* run 'pnpm up preact' because posthog-js had a vulnerable install. see https://github.com/advisories/GHSA-36hm-qxxp-pg3

* add work around for browser timeout errors in test

* update other references of yarn to pnpm

Co-authored-by: Matthew Irish <39469+meirish@users.noreply.github.com>
2026-01-09 11:45:14 -06:00

40 lines
1.3 KiB
Bash
Executable file

#!/usr/bin/env bash
# Copyright IBM Corp. 2016, 2025
# SPDX-License-Identifier: BUSL-1.1
# This script builds Vault binaries and optionally packages them.
#
# Two distinct workflows are supported:
# 1. Standard build: Builds to dist/ and creates zip bundle from dist/
# 2. Target path build: Builds to dist/, copies to TARGET_BIN_PATH, skips bundling
# (bundling is skipped to avoid confusion when binary exists in multiple locations)
#
# Environment variables:
# - BUILD_UI: Set to "true" to build UI components
# - TARGET_BIN_PATH: If set, copies built binary to this location instead of bundling
# - BUNDLE_PATH: If set (and TARGET_BIN_PATH is not), creates zip bundle at this path
set -eux -o pipefail
export CGO_ENABLED=0
root_dir="$(git rev-parse --show-toplevel)"
pushd "$root_dir" > /dev/null
if [ -n "$BUILD_UI" ] && [ "$BUILD_UI" = "true" ]; then
make ci-build-ui
fi
make ci-build
popd > /dev/null
if [ -n "$TARGET_BIN_PATH" ]; then
echo "--> Target binary path specified, copying binary and skipping bundle"
make -C "$root_dir" ci-copy-binary
elif [ -n "$BUNDLE_PATH" ]; then
echo "--> Creating zip bundle from dist/"
make -C "$root_dir" ci-bundle
else
echo "--> No post-build packaging requested (neither TARGET_BIN_PATH nor BUNDLE_PATH specified)"
fi