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
9 years ago
|
#!/usr/bin/env bash
|
||
|
|
||
|
set -e
|
||
|
|
||
9 years ago
|
BRANCH_NAME=$(git branch | grep '*' | sed 's/* //')
|
||
|
|
||
8 years ago
|
if [[ "$BRANCH_NAME" == 'master' ]]; then
|
||
9 years ago
|
# Build new web documentation:
|
||
|
make build-gh-pages
|
||
9 years ago
|
fi
|
||
9 years ago
|
|
||
9 years ago
|
if [[ "$BRANCH_NAME" == 'staging' ]]; then
|
||
8 years ago
|
# Compare script version and the latest tag:
|
||
9 years ago
|
NEWEST_TAG=$(git describe --abbrev=0 --tags)
|
||
9 years ago
|
SCRIPT_VERSION=$(bash ${PWD}/git-secret --version)
|
||
8 years ago
|
|
||
9 years ago
|
if [[ "$NEWEST_TAG" != "v${SCRIPT_VERSION}" ]]; then
|
||
8 years ago
|
# Create new release:
|
||
9 years ago
|
git tag -a "v${SCRIPT_VERSION}" -m "version $SCRIPT_VERSION"
|
||
|
fi
|
||
9 years ago
|
fi
|