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