Skip to content

Commit c130661

Browse files
committed
script checks for SE tag. required
1 parent 3b22e79 commit c130661

File tree

1 file changed

+12
-9
lines changed

1 file changed

+12
-9
lines changed

github_release.sh

Lines changed: 12 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,18 @@
1+
# If you have an env file, and you've set SE variable to something
2+
# other than tda, prevent the release from happening
3+
if [ -f ".env" ]
4+
then
5+
export $(cat .env | xargs) # Set env vars from .env file so they're accessible
6+
if [[ $SE && $SE != 'tda' ]]
7+
then
8+
printf "Your SE environment variable is set to $SE.\nThe SE variable must be set to tda to create a release.\nPlease change it in your env file and try again."
9+
exit
10+
fi
11+
fi
12+
113
PACKAGE_VERSION=$(node -p -e "require('./package.json').version")
214
REPO=sentry-demos/sentry_react_native
315

4-
while true; do
5-
read -p "Is the right value set for SE tag in .env? Answer y/n: " yn
6-
case $yn in
7-
[Yy]* ) break;;
8-
[Nn]* ) exit;;
9-
* ) echo "Please answer y or n.";;
10-
esac
11-
done
12-
1316
while true; do
1417
read -p "Do you wish to create Github Release $PACKAGE_VERSION for $REPO? Answer y/n: " yn
1518
case $yn in

0 commit comments

Comments
 (0)