mirror of
https://github.com/caprover/caprover
synced 2025-12-12 06:15:40 +00:00
Updated release script
This commit is contained in:
@@ -1,11 +1,5 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
echo Reserved for REPO_NAME=${GITHUB_REPOSITORY##*/}
|
|
||||||
echo GITHUB_REF=${GITHUB_REF}
|
|
||||||
echo EXTRACT_GITHUB_REF=${GITHUB_REF##*/}
|
|
||||||
echo EXTRACT_GITHUB_REF_HEADS=$(echo ${GITHUB_REF#refs/heads/})
|
|
||||||
BRANCH=${GITHUB_REF##*/}
|
|
||||||
|
|
||||||
# Exit early if any command fails
|
# Exit early if any command fails
|
||||||
set -e
|
set -e
|
||||||
|
|
||||||
@@ -22,14 +16,14 @@ if [ ! -f ./package-lock.json ]; then
|
|||||||
exit 1;
|
exit 1;
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if ! [ $(id -u) = 0 ]; then
|
# if ! [ $(id -u) = 0 ]; then
|
||||||
echo "Must run as sudo or root"
|
# echo "Must run as sudo or root"
|
||||||
exit 1
|
# exit 1
|
||||||
fi
|
# fi
|
||||||
|
|
||||||
# BRANCH=$(git rev-parse --abbrev-ref HEAD)
|
# BRANCH=$(git rev-parse --abbrev-ref HEAD)
|
||||||
# On Github the line above does not work, instead:
|
# On Github the line above does not work, instead:
|
||||||
|
BRANCH=${GITHUB_REF##*/}
|
||||||
echo "on branch $BRANCH"
|
echo "on branch $BRANCH"
|
||||||
if [[ "$BRANCH" != "testing-release" ]]; then
|
if [[ "$BRANCH" != "testing-release" ]]; then
|
||||||
echo 'Not on release branch! Aborting script!';
|
echo 'Not on release branch! Aborting script!';
|
||||||
|
|||||||
Reference in New Issue
Block a user