File tree Expand file tree Collapse file tree 1 file changed +34
-0
lines changed Expand file tree Collapse file tree 1 file changed +34
-0
lines changed Original file line number Diff line number Diff line change
1
+ #! /bin/bash
2
+ set -euo pipefail
3
+
4
+ # In order to sync with upstream, run merge.bash
5
+
6
+ # TODO(hyangah): commands for building docker container and running tests locally with docker run.
7
+ root_dir () {
8
+ local script_name=$( readlink -f " ${0} " )
9
+ local script_dir=$( dirname " ${script_name} " )
10
+ local parent_dir=$( dirname " ${script_dir} " )
11
+ echo " ${parent_dir} "
12
+ }
13
+
14
+ ROOT=" $( root_dir) "
15
+ cd " ${ROOT} " # always run from the root directory.
16
+
17
+ WORKTREE=" $( mktemp -d) "
18
+ BRANCH=" sync/merge-upstream-$( date +%Y%m%d%H%M%S) "
19
+
20
+ git fetch
21
+ git worktree add --track -b " ${BRANCH} " " ${WORKTREE} " origin/master
22
+
23
+ cd " ${WORKTREE} "
24
+ export GIT_GOFMT_HOOK=off
25
+ git merge --no-commit " origin/upstream" || echo " Ignoring conflict..."
26
+
27
+ COMMIT=` git log --format=%h -n 1 " origin/upstream" `
28
+
29
+ gcloud builds submit --config=build/cloud.yaml || echo " Build failed. Please address the issue..."
30
+
31
+ git commit -m " sync: merge microsoft/vscode-go@${COMMIT} into master"
32
+
33
+
34
+ cd - && git worktree remove " ${WORKTREE} "
You can’t perform that action at this time.
0 commit comments