forked from naggie/dstask
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
We should be able to rely on pushing and pulling from the default branch without explicitly setting "master", or anything else. dstask will simply push and pull from the remote named "origin" using whatever default tracking branch is set. In git 2.32, it's possible to specify the default initial branch for git repositories. This is globally configurable with **init.defaultBranch**. See `man git-init` for details. Refs naggie#116
- Loading branch information
Showing
7 changed files
with
59 additions
and
23 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -14,5 +14,8 @@ steps: | |
- name: test | ||
image: golang:1.13 | ||
commands: | ||
# TODO do we need these? | ||
#- 'git config --global user.email "[email protected]"' | ||
#- 'git config --global user.name "Your Name"' | ||
- "go test -v -mod=vendor ./..." | ||
- "./integrationtest.sh" |
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
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 |
---|---|---|
|
@@ -30,8 +30,10 @@ trap cleanup EXIT | |
|
||
go build -o dstask -mod=vendor cmd/dstask/main.go | ||
|
||
# initialse git repo | ||
# initialise git repo | ||
BRANCH="branch_${RANDOM}" | ||
git -C $DSTASK_GIT_REPO init | ||
git -C $DSTASK_GIT_REPO checkout -b $BRANCH | ||
git -C $DSTASK_GIT_REPO config user.email "[email protected]" | ||
git -C $DSTASK_GIT_REPO config user.name "Test user" | ||
git -C $UPSTREAM_BARE_REPO init --bare | ||
|
@@ -105,8 +107,8 @@ unset DSTASK_FAKE_PTY | |
|
||
# set the bare repository as upstream origin to test sync against, and then push to it | ||
git -C $DSTASK_GIT_REPO remote add origin $UPSTREAM_BARE_REPO | ||
git -C $DSTASK_GIT_REPO push origin master | ||
git -C $DSTASK_GIT_REPO branch --set-upstream-to=origin/master master | ||
git -C $DSTASK_GIT_REPO push origin $BRANCH | ||
git -C $DSTASK_GIT_REPO branch --set-upstream-to=origin/$BRANCH $BRANCH | ||
./dstask sync | ||
|
||
# cause independent changes (could be from separate downstream repositories, | ||
|
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