-
Notifications
You must be signed in to change notification settings - Fork 47
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: add script to check if release is ok
- Loading branch information
1 parent
856240c
commit 2c53fd1
Showing
2 changed files
with
12 additions
and
1 deletion.
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
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,11 @@ | ||
|
||
# Get the main field from package.json | ||
FILE=$(cat ./package.json | grep main | head -1 | awk -F: '{ print $2 }' | sed 's/[",]//g' | tr -d '[[:space:]]') | ||
|
||
# test the path to see if the file exists | ||
if test -f "$FILE"; then | ||
echo "Release is OK" | ||
else | ||
echo "Release is NOT ok because the file specified as main in package.json at path ${FILE} does not exist" | ||
exit 1 | ||
fi |