Skip to content

Commit 8c75f7d

Browse files
Merge #550
550: Fix check release script replacing tr with cut r=bidoubiwa a=bidoubiwa The check-release script was using `tr`, tr removed every character provided as argument, thus in the script, the following: `tr -d 'refs/tags/v'` removes every occurrence of the letters it contains. In our case, it removes `s, t, r, a`. resulting in `refs/tags/v0.1.0-strapi-v3.1` being transformed in `0.1.0-pi-v3.1`. I updated the `check-release.sh` script using `cut` to remove these first 12 characters `refs/tags/v`. Co-authored-by: Charlotte Vermandel <[email protected]>
2 parents 6101b58 + a0f204f commit 8c75f7d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

.github/scripts/check-release.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#!/bin/sh
22

33
# Checking if current tag matches the package version
4-
current_tag=$(echo $GITHUB_REF | tr -d 'refs/tags/v')
4+
current_tag=$(echo $GITHUB_REF | cut -c 12-)
55
file_tag=$(grep '"version":' package.json | cut -d ':' -f 2- | tr -d ' ' | tr -d '"' | tr -d ',')
66
if [ "$current_tag" != "$file_tag" ]; then
77
echo "Error: the current tag does not match the version in package file(s)."

0 commit comments

Comments
 (0)