We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent afd5e85 commit dfe1b2fCopy full SHA for dfe1b2f
distribution/build_and_upload_gcp_artifacts.sh
@@ -6,6 +6,19 @@ if [[ -n $(git diff HEAD) ]]; then
6
exit 1
7
fi
8
9
+# Get current branch name
10
+local_branch=$(git rev-parse --abbrev-ref HEAD)
11
+
12
+# Fetch latest from remote
13
+git fetch origin $local_branch
14
15
+# Check if local is behind remote
16
+if [[ -n $(git diff HEAD..origin/$local_branch) ]]; then
17
+ echo "Error: Your branch is not in sync with remote"
18
+ echo "Please push your local changes and sync your local branch $local_branch with remote"
19
+ exit 1
20
+fi
21
22
set -e
23
24
SCRIPT_DIRECTORY=$(dirname -- "$(realpath -- "$0")")
0 commit comments