-
Notifications
You must be signed in to change notification settings - Fork 117
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
143: Add check release script r=eskombro a=curquiza Closes #140 I tested it this way to "immitate" the GitHub action behavior: <img width="581" alt="Capture d’écran 2021-03-20 à 19 36 50" src="https://user-images.githubusercontent.com/20380692/111882044-a37d9600-89b3-11eb-804e-14e19f725fea.png"> Co-authored-by: Clémentine Urquizar <[email protected]>
- Loading branch information
Showing
2 changed files
with
23 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
#!/bin/sh | ||
|
||
# Checking if current tag matches the package version | ||
current_tag=$(echo $GITHUB_REF | tr -d 'refs/tags/v') | ||
check1='build.gradle' | ||
check2='README.md' | ||
check3='README.md' | ||
|
||
tag1=$(grep '^version = ' $check1 | cut -d "'" -f 2 | tr -d ' ') | ||
tag2=$(grep '<version>' $check2 | cut -d '>' -f2 | cut -d '<' -f1) | ||
tag3=$(grep 'implementation' $check3 | cut -d : -f3 | tr -d "'") | ||
if [ "$current_tag" != "$tag1" ] || [ "$current_tag" != "$tag2" ] || [ "$current_tag" != "$tag3" ]; then | ||
echo "Error: the current tag does not match the version in package check(s)." | ||
echo "$check1: found $tag1 - expected $current_tag" | ||
echo "$check2: found $tag2 - expected $current_tag" | ||
echo "$check3: found $tag3 - expected $current_tag" | ||
exit 1 | ||
fi | ||
|
||
echo 'OK' | ||
exit 0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters