-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
The command aims to publish current local branch. Before, it will bring latest changes from remote `master` and apply your commits on top of them.
- Loading branch information
Showing
5 changed files
with
60 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
#!/usr/bin/env bash | ||
set -e | ||
|
||
default() { | ||
local BRANCH=$(__branches 'git branch | grep \*') | ||
if [[ "$BRANCH" == "master" ]]; then | ||
box "No pushes to 'master' branch. Please read more on ${__site}" | ||
exit 81 | ||
fi | ||
boxtee git fetch | ||
boxtee git rebase ${RMASTER} | ||
boxtee git push --set-upstream --force origin ${BRANCH}:${BRANCH} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -11,6 +11,7 @@ teardown() { | |
COMMANDS=( | ||
"start-work" | ||
"save-work" | ||
"deliver-work" | ||
"accept-work" | ||
"pull" | ||
"push" | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
#!/usr/bin/env bats | ||
|
||
load addons-common | ||
load addons-read | ||
load addons-fake | ||
|
||
teardown() { | ||
clean-fake | ||
} | ||
|
||
@test "'deliver-work': by default, a name of remote branch is equal to local branch" { | ||
fake-pass git branch *feature1 | ||
fake-pass git "fetch" | ||
fake-pass git "rebase origin/master" | ||
fake-pass git "push --set-upstream --force origin feature1:feature1" | ||
check git-elegant deliver-work | ||
[ "$status" -eq 0 ] | ||
[ "${lines[7]}" = "== git push --set-upstream --force origin feature1:feature1 ==" ] | ||
} | ||
|
||
@test "'deliver-work': raise error #81 if current local branch is master" { | ||
fake-pass git branch *master | ||
fake-pass git "fetch" | ||
fake-pass git "rebase origin/master" | ||
fake-pass git "push --set-upstream --force origin master:master" | ||
check git-elegant deliver-work | ||
[ "$status" -eq 81 ] | ||
[ "${lines[1]}" = "== No pushes to 'master' branch. Please read more on https://elegant-git.bees-hive.org ==" ] | ||
} |