mirror of https://github.com/sobolevn/git-secret
You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
22 lines
528 B
Bash
22 lines
528 B
Bash
#!/usr/bin/env bash
|
|
|
|
set -e
|
|
|
|
BRANCH_NAME=$(git branch | grep '*' | sed 's/* //')
|
|
|
|
if [[ "$BRANCH_NAME" == 'master' ]]; then
|
|
# Build new web documentation:
|
|
make build-gh-pages
|
|
fi
|
|
|
|
if [[ "$BRANCH_NAME" == 'staging' ]]; then
|
|
# Compare script version and the latest tag:
|
|
NEWEST_TAG=$(git describe --abbrev=0 --tags)
|
|
SCRIPT_VERSION=$(bash ${PWD}/git-secret --version)
|
|
|
|
if [[ "$NEWEST_TAG" != "v${SCRIPT_VERSION}" ]]; then
|
|
# Create new release:
|
|
git tag -a "v${SCRIPT_VERSION}" -m "version $SCRIPT_VERSION"
|
|
fi
|
|
fi
|