Skip to content

Commit

Permalink
Merge #550
Browse files Browse the repository at this point in the history
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]>
  • Loading branch information
meili-bors[bot] and bidoubiwa authored Oct 18, 2022
2 parents 6101b58 + a0f204f commit 8c75f7d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion .github/scripts/check-release.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/bin/sh

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

0 comments on commit 8c75f7d

Please sign in to comment.