INNER CODE UNIT · Shell

BRANCH

jkroepke/helm-secrets · contrib/release.sh:17

BRANCH=$(git rev-parse --abbrev-ref HEAD)
if [[ "$BRANCH" != "main" ]]; then
    echo "Please checkout main"
    exit 1
fi

# https://stackoverflow.com/a/3278427/8087167
UPSTREAM='@{u}'
LOCAL=$(git rev-parse @)
REMOTE=$(git rev-parse "$UPSTREAM")

if [ "$LOCAL" != "$REMOTE" ]; then
    echo "Current branch is no up to date with origin. Please pull or push"
    exit 1
fi

sedi "s/version:.*/version: \"${1}\"/" "$(git rev-parse --show-toplevel)/plugin.yaml"
sedi "s/version:.*/version: \"${1}\"/" "$(git rev-parse --show-toplevel)/plugins/helm-secrets-cli/plugin.yaml"

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…