File tree Expand file tree Collapse file tree 1 file changed +10
-2
lines changed Expand file tree Collapse file tree 1 file changed +10
-2
lines changed Original file line number Diff line number Diff line change 47
47
NEW_PATTERN=" $PATTERN$NEW_TAG "
48
48
fi
49
49
50
- if [[ " $INPUT_ONLY_MAJOR " == " true" && " $INPUT_USE_TAG_COMMIT_HASH " != " true " ]]; then
50
+ if [[ " $INPUT_ONLY_MAJOR " == " true" ]]; then
51
51
NEW_MAJOR_TAG=$( echo " $NEW_TAG " | cut -d. -f1)
52
52
CURRENT_MAJOR_TAG=$( echo " $CURRENT_TAG " | cut -d. -f1)
53
53
54
54
if [[ " $NEW_MAJOR_TAG " == " $CURRENT_MAJOR_TAG " ]]; then
55
- echo " Skipping: This will only run on major version release not '$NEW_TAG '." ;
55
+ if [[ " $INPUT_USE_TAG_COMMIT_HASH " == " true" ]]; then
56
+ for path in $INPUT_PATHS
57
+ do
58
+ echo " Replacing $CURRENT_COMMIT_HASH with $NEW_COMMIT_HASH for: $path "
59
+ sed -i " s|$CURRENT_PATTERN |$NEW_PATTERN |g" " $path "
60
+ done
61
+ else
62
+ echo " Skipping: This will only run on major version release not '$NEW_TAG '." ;
63
+ fi
56
64
cat << EOF >> "$GITHUB_OUTPUT "
57
65
new_version=$NEW_TAG
58
66
old_version=$CURRENT_TAG
You can’t perform that action at this time.
0 commit comments