make update-ui-version (#578)
* make update-ui-version * make update-ui-version: default branch main * make update-ui-version: actually checkout commit
This commit is contained in:
1 parent
f24e478542
commit
560c727bcf
5 files changed
+94
-30
No files matched your search
Executable
+29
@@ -0,0 +1,29 @@
|
||||
#!/bin/sh
|
||||
|
||||
set -e
|
||||
|
||||
if [ -z "$UI_COMMITISH" ]; then
|
||||
echo "Must set UI_COMMITISH"; exit 1
|
||||
fi
|
||||
|
||||
if [ -z "$UI_CLONE_DIR" ]; then
|
||||
echo "Must set UI_CLONE_DIR"; exit 1
|
||||
fi
|
||||
|
||||
if [ -z "$UI_VERSION_FILE" ]; then
|
||||
echo "Must set UI_CLONE_DIR"; exit 1
|
||||
fi
|
||||
|
||||
tempdir="$(dirname "${UI_CLONE_DIR}")"
|
||||
|
||||
mkdir -p "${tempdir}"
|
||||
echo "*" > "${tempdir}/.gitignore"
|
||||
|
||||
if ! [ -d "${UI_CLONE_DIR}/.git" ]; then
|
||||
git clone https://github.com/hashicorp/boundary-ui "${UI_CLONE_DIR}"
|
||||
fi
|
||||
|
||||
cd "${UI_CLONE_DIR}"
|
||||
git reset --hard
|
||||
git fetch origin "${UI_COMMITISH}"
|
||||
git checkout "${UI_COMMITISH}"
|
||||
Reference in new issue
Block a user