File tree 2 files changed +12
-1
lines changed
2 files changed +12
-1
lines changed Original file line number Diff line number Diff line change @@ -35,6 +35,7 @@ permissions:
35
35
36
36
env :
37
37
CODER_RELEASE : ${{ github.event.inputs.snapshot && 'false' || 'true' }}
38
+ DRY_RUN : ${{ (github.event.inputs.dry_run || github.event.inputs.snapshot) && 'true' || 'false' }}
38
39
39
40
jobs :
40
41
release :
@@ -115,6 +116,11 @@ jobs:
115
116
ref=HEAD
116
117
old_version="$(git describe --abbrev=0 "$ref^1")"
117
118
119
+ if [[ $DRY_RUN == true ]]; then
120
+ # Allow dry-run of branches to pass.
121
+ export CODER_IGNORE_MISSING_COMMIT_METADATA=1
122
+ fi
123
+
118
124
# Cache commit metadata.
119
125
. ./scripts/release/check_commit_metadata.sh "$old_version" "$ref"
120
126
Original file line number Diff line number Diff line change @@ -26,6 +26,11 @@ if [[ -z $to_ref ]]; then
26
26
error " No to_ref specified"
27
27
fi
28
28
29
+ ignore_missing_metadata=${CODER_IGNORE_MISSING_COMMIT_METADATA:- 0}
30
+ if [[ $ignore_missing_metadata == 1 ]]; then
31
+ log " WARNING: Ignoring missing commit metadata, breaking changes may be missed."
32
+ fi
33
+
29
34
range=" $from_ref ..$to_ref "
30
35
31
36
# Check dependencies.
@@ -88,7 +93,7 @@ main() {
88
93
commit_prefix=${parts[2]}
89
94
90
95
# Safety-check, guarantee all commits had their metadata fetched.
91
- if [[ ! -v labels[$commit_sha_long ] ]]; then
96
+ if [[ $ignore_missing_metadata != 1 ]] && [[ ! -v labels[$commit_sha_long ] ]]; then
92
97
error " Metadata missing for commit $commit_sha_short "
93
98
fi
94
99
You can’t perform that action at this time.
0 commit comments