Skip to content

Commit ae40938

Browse files
committed
add release script
1 parent 480e046 commit ae40938

File tree

2 files changed

+27
-1
lines changed

2 files changed

+27
-1
lines changed

hackathon/spacecraft/bin/release.sh

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
#!/bin/bash
2+
prompt() {
3+
echo "$1"
4+
read -p "Would you like to release? [Y/n]: " PROMPT_RESULT
5+
}
6+
7+
yarn version --minor
8+
# Read 'version' key from package.json
9+
version=$(jq -r '.version' ./package.json)
10+
echo "Releasing $version"
11+
12+
# Add a git tag based on the 'version'
13+
# git tag -a "$version" -m "Release $version"
14+
git commit -am "chore: 🤖 release $version"
15+
git push origin main
16+
echo "Pushed $version to github.com"
17+
18+
prompt "Release to production for iOS and Android"
19+
if [[ $PROMPT_RESULT == "Y" ]]; then
20+
# Release to production
21+
# eas build --auto-submit --platform=ios --non-interactive
22+
eas build --auto-submit --platform=android --non-interactive
23+
fi

hackathon/spacecraft/package.json

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
{
2+
"name": "spacecraft",
3+
"version": "2.0.0",
24
"license": "MIT",
35
"main": "node_modules/expo/AppEntry.js",
46
"scripts": {
@@ -16,7 +18,8 @@
1618
"storybook": "sb-rn-get-stories && STORYBOOK_ENABLED='true' expo start",
1719
"storybook:ios": "sb-rn-get-stories && STORYBOOK_ENABLED='true' expo start --ios",
1820
"storybook:android": "sb-rn-get-stories && STORYBOOK_ENABLED='true' expo start --android",
19-
"e2e": "maestro test e2e/process.yaml"
21+
"e2e": "maestro test e2e/process.yaml",
22+
"release": "./bin/release.sh"
2023
},
2124
"jest": {
2225
"preset": "jest-expo",

0 commit comments

Comments
 (0)