-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update package file for Concourse build
- Loading branch information
Showing
2 changed files
with
24 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
#!/usr/bin/env bash | ||
|
||
set -euo pipefail | ||
set -xeuo pipefail | ||
|
||
node::install() { | ||
local download_file | ||
|
@@ -50,18 +50,27 @@ declare git_url git_tag work_dir | |
declare -x TAG NODE_VERSION TMP_DIR | ||
|
||
git_url="https://github.com/cloudfoundry-community/stratos.git" | ||
git_tag="${TAG:-master}" | ||
git_tag="${TAG:-develop}" | ||
work_dir="${PWD}" | ||
NODE_VERSION="${NODE_VERISON:-20.13.1}" | ||
TMP_DIR=/tmp | ||
|
||
git clone "${git_url}" stratos-ui || true | ||
if [[ -z ${USE_LOCAL:-""} ]] ; then | ||
|
||
if [[ -n ${git_tag} ]]; then | ||
pushd stratos-ui | ||
git checkout "${git_tag}" | ||
export stratos_version="${git_tag}" | ||
popd | ||
git clone "${git_url}" stratos-ui || true | ||
|
||
if [[ -n ${git_tag} ]]; then | ||
pushd stratos-ui | ||
git checkout "${git_tag}" | ||
export stratos_version="${git_tag}" | ||
popd | ||
fi | ||
else | ||
echo "Using local checked out copy on stratos-ui" | ||
fi | ||
|
||
if [[ -z ${VERSION:-""}]]; then | ||
export stratos_version="${$VERSION}" # Will be tagged on publish in Concourse | ||
fi | ||
|
||
function exit_trap() { | ||
|
@@ -108,7 +117,11 @@ echo "web: ./deploy/cloud-foundry/start.sh" > "${build_dir}/Procfile" | |
|
||
ls -lah "${build_dir}" | ||
cd "${build_dir}" | ||
zip -r "${work_dir}/stratos-ui-packaged.zip" ./* | ||
if [[ -z ${BUILD_ROOT:-"" }]] ; then | ||
zip -r [email protected] "${BUILD_ROOT}/stratos-ui-packaged.zip" ./* | ||
else | ||
zip -r [email protected] "${work_dir}/stratos-ui-packaged.zip" ./* | ||
fi | ||
cd "${work_dir}" | ||
|
||
exit 0 |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.