build: fix the preview
mode for release tool
This commit is contained in:
parent
fd0f983bbe
commit
7f18cdc1fd
1 changed files with 7 additions and 11 deletions
|
@ -184,11 +184,6 @@ build_gem() {
|
|||
release() {
|
||||
_version="$1" # X.Y.Z
|
||||
|
||||
if $opt_pre; then
|
||||
$opt_pre
|
||||
exit 0
|
||||
fi
|
||||
|
||||
git checkout "$PROD_BRANCH"
|
||||
git merge --no-ff --no-edit "$working_branch"
|
||||
|
||||
|
@ -196,8 +191,6 @@ release() {
|
|||
echo -e "Create tag v$_version\n"
|
||||
git tag "v$_version"
|
||||
|
||||
build_gem
|
||||
|
||||
# merge from patch branch to the staging branch
|
||||
# NOTE: This may break due to merge conflicts, so it may need to be resolved manually.
|
||||
if [[ $working_branch == hotfix/* ]]; then
|
||||
|
@ -224,11 +217,14 @@ main() {
|
|||
echo -e "Bump version number to $_version\n"
|
||||
bump "$_version"
|
||||
|
||||
release "$_version"
|
||||
|
||||
# Undo all changes on Git
|
||||
$opt_pre && git reset --hard && git clean -fd
|
||||
build_gem
|
||||
|
||||
if [[ $opt_pre = true ]]; then
|
||||
# Undo all changes on Git
|
||||
git reset --hard && git clean -fd
|
||||
else
|
||||
release "$_version"
|
||||
fi
|
||||
}
|
||||
|
||||
while (($#)); do
|
||||
|
|
Loading…
Reference in a new issue