Skip to content

Commit 3fccfc7

Browse files
author
Lisa Meed
committed
Include command to get commit hash
1 parent ae9e45a commit 3fccfc7

File tree

1 file changed

+13
-8
lines changed

1 file changed

+13
-8
lines changed

run/get_updates.sh

+13-8
Original file line numberDiff line numberDiff line change
@@ -17,18 +17,23 @@ check_for_updates() {
1717
exit_no_commits
1818
fi
1919

20-
UPSTREAM_TARGET=""
21-
20+
# UPSTREAM_TARGET=""
21+
22+
# if [ -n ${INPUT_UPSTREAM_SYNC_TAG} ]; then
23+
# # Pull tags
24+
# write_out -1 'Fetching latest tags from upstream.\n'
25+
# git fetch --quiet --shallow-since="${INPUT_SHALLOW_SINCE}" upstream --tags
26+
# git tag
27+
# UPSTREAM_TARGET="${INPUT_UPSTREAM_SYNC_TAG}"
28+
# else
29+
#
30+
# fi
2231
if [ -n ${INPUT_UPSTREAM_SYNC_TAG} ]; then
23-
# Pull tags
24-
write_out -1 'Fetching latest tags from upstream.\n'
25-
git fetch --quiet --shallow-since="${INPUT_SHALLOW_SINCE}" upstream --tags
26-
git tag
27-
UPSTREAM_TARGET="${INPUT_UPSTREAM_SYNC_TAG}"
32+
UPSTREAM_COMMIT_HASH = $(git log --pretty='format:%H %D' | egrep ".{40} tag: "${INPUT_UPSTREAM_SYNC_TAG} | awk '{print $1}')
2833
else
2934
UPSTREAM_TARGET="upstream/${INPUT_UPSTREAM_SYNC_BRANCH}"
35+
UPSTREAM_COMMIT_HASH = $(git "rev-parse ${UPSTREAM_TARGET}")
3036
fi
31-
UPSTREAM_COMMIT_HASH=$(git "rev-parse ${UPSTREAM_TARGET}")
3237

3338

3439
# check is latest upstream hash is in target branch

0 commit comments

Comments
 (0)