Skip to content

Commit

Permalink
deploy script 하나로 통일
Browse files Browse the repository at this point in the history
  • Loading branch information
woohm402 committed May 16, 2024
1 parent 353de68 commit 1398ef6
Show file tree
Hide file tree
Showing 6 changed files with 20 additions and 39 deletions.
5 changes: 2 additions & 3 deletions apps/friends-react-native/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,7 @@
"start:assets": "serve -s public -l 8082",
"start": "APP_ENV=local react-native start",
"build:android": "react-native bundle --platform android --dev false --entry-file index.js --bundle-output dist/android.jsbundle --assets-dest android/com/wafflestudio/snutt-staging/src/main/res/",
"build:ios": "react-native bundle --dev false --entry-file index.js --bundle-output dist/ios.jsbundle --assets-dest ./ios --platform ios",
"deploy:dev": "scripts/deploy.sh dev",
"deploy:prod": "echo prod 배포는 github 에서 직접 릴리즈를 생성해 주세요."
"build:ios": "react-native bundle --dev false --entry-file index.js --bundle-output dist/ios.jsbundle --assets-dest ./ios --platform ios"
},
"dependencies": {
"@react-native-async-storage/async-storage": "1.19.8",
Expand Down Expand Up @@ -44,6 +42,7 @@
"eslint-plugin-jest": "27.6.1",
"jest": "29.2.1",
"metro-react-native-babel-preset": "0.76.5",
"prettier": "^3.2.5",
"react-native-dotenv": "3.4.9",
"react-native-svg-transformer": "1.1.0",
"react-test-renderer": "18.2.0",
Expand Down
4 changes: 1 addition & 3 deletions apps/snutt-webclient/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,7 @@
"preview:test": "vite preview --mode test",
"test:e2e": "playwright test",
"test": "jest",
"lint": "npx eslint ./src",
"deploy:dev": "scripts/deploy.sh dev",
"deploy:prod": "echo prod 배포는 github 에서 직접 릴리즈를 생성해 주세요."
"lint": "npx eslint ./src"
},
"dependencies": {
"@tanstack/react-query": "5.14.1",
Expand Down
30 changes: 0 additions & 30 deletions apps/snutt-webclient/scripts/deploy.sh

This file was deleted.

4 changes: 3 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,9 @@
"scripts": {
"lint": "turbo run lint",
"test": "turbo run test",
"tsc": "turbo run tsc"
"tsc": "turbo run tsc",
"deploy:friends-react-native": "./scripts/deploy.sh friends-react-native",
"deploy:snutt-webclient": "./scripts/deploy.sh snutt-webclient"
},
"dependencies": {
"turbo": "1.10.12"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,16 @@
#!/bin/sh

env=$1
app=$1

if [ "$app" != "snutt-webclient" ] && [ "$app" != "friends-react-native" ]; then
echo
echo "\033[31mInvalid app name.\033[0m"
echo
exit 1
fi

today=$(date +%y.%m.%d)
tagFormat="friends-react-native-${env}-${today}-"
tagFormat="${app}-dev-${today}-"

git fetch --all --tags
tagCount=$(git tag -l | grep -c $tagFormat)
Expand Down
5 changes: 5 additions & 0 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -7729,6 +7729,11 @@ [email protected]:
resolved "https://registry.yarnpkg.com/prettier/-/prettier-3.1.1.tgz#6ba9f23165d690b6cbdaa88cb0807278f7019848"
integrity sha512-22UbSzg8luF4UuZtzgiUOfcGM8s4tjBv6dJRT7j275NXsy2jb4aJa4NNveul5x4eqlF1wuhuR2RElK71RvmVaw==

prettier@^3.2.5:
version "3.2.5"
resolved "https://registry.yarnpkg.com/prettier/-/prettier-3.2.5.tgz#e52bc3090586e824964a8813b09aba6233b28368"
integrity sha512-3/GWa9aOC0YeD7LUfvOG2NiDyhOWRvt1k+rcKhOuYnMY24iiCphgneUfJDyFXd6rZCAnuLBv6UeAULtrhT/F4A==

pretty-format@^26.5.2, pretty-format@^26.6.2:
version "26.6.2"
resolved "https://registry.yarnpkg.com/pretty-format/-/pretty-format-26.6.2.tgz#e35c2705f14cb7fe2fe94fa078345b444120fc93"
Expand Down

0 comments on commit 1398ef6

Please sign in to comment.