From 0de0bcda5353e9dee4a47ae7932b4974b8fe8492 Mon Sep 17 00:00:00 2001 From: RcleydsonR Date: Mon, 8 Aug 2022 12:58:47 -0300 Subject: [PATCH 01/13] feat: configure eas json file with only submit type --- app/eas.json | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 app/eas.json diff --git a/app/eas.json b/app/eas.json new file mode 100644 index 000000000..300f4ac88 --- /dev/null +++ b/app/eas.json @@ -0,0 +1,19 @@ +{ + "cli": { + "version": ">= 0.57.0" + }, + "submit": { + "production": { + "android": { + "serviceAccountKeyPath": "./serviceAccountKey.json", + "track": "production" + } + }, + "alpha_test": { + "android": { + "serviceAccountKeyPath": "./serviceAccountKey.json", + "track": "alpha" + } + } + } +} From 4c641c0c18e58712666793905508c7fba54e6f74 Mon Sep 17 00:00:00 2001 From: RcleydsonR Date: Mon, 8 Aug 2022 13:00:41 -0300 Subject: [PATCH 02/13] feat: prepare app for eas build in future --- app/app.config.js | 2 +- app/app.json | 2 +- app/metro.config.js | 29 ++++---- app/package.json | 5 +- app/src/services/Firebase.js | 4 +- app/yarn.lock | 131 ++++++++++++++++++++++++++++++++--- 6 files changed, 143 insertions(+), 30 deletions(-) diff --git a/app/app.config.js b/app/app.config.js index c708ba245..fa4240a89 100644 --- a/app/app.config.js +++ b/app/app.config.js @@ -20,7 +20,7 @@ export default ({ config }) => { apiKey: MAPS_API_KEY, }, }, - versionCode: 211, + versionCode: 212, }, }; }; diff --git a/app/app.json b/app/app.json index 811d6d661..80bbe0c7e 100644 --- a/app/app.json +++ b/app/app.json @@ -9,7 +9,7 @@ "color": "#4b8ab9", "androidMode": "default" }, - "version": "2.1.0 Mutt", + "version": "2.1.1 Mutt", "orientation": "portrait", "icon": "./assets/images/logo.png", "splash": { diff --git a/app/metro.config.js b/app/metro.config.js index 906f852cd..62fbec05b 100644 --- a/app/metro.config.js +++ b/app/metro.config.js @@ -1,19 +1,14 @@ -const { getDefaultConfig } = require('metro-config'); +const { getDefaultConfig } = require('expo/metro-config'); -module.exports = (async () => { - const { - resolver: { sourceExts, assetExts }, - } = await getDefaultConfig(); +const config = getDefaultConfig(__dirname); - return { - transformer: { - babelTransformerPath: require.resolve( - 'react-native-svg-transformer', - ), - }, - resolver: { - assetExts: assetExts.filter((ext) => ext !== 'svg'), - sourceExts: [...sourceExts, 'svg'], - }, - }; -})(); +config.transformer.babelTransformerPath = require.resolve( + 'react-native-svg-transformer', +); + +config.resolver.assetExts = config.resolver.assetExts.filter( + (ext) => ext !== 'svg', +); +config.resolver.sourceExts = [...config.resolver.sourceExts, 'svg']; + +module.exports = config; diff --git a/app/package.json b/app/package.json index 198a51ebb..f10d7650b 100644 --- a/app/package.json +++ b/app/package.json @@ -25,12 +25,15 @@ "@react-navigation/stack": "^5.2.9", "axios": "^0.21.1", "expo": "^45.0.0", + "expo-dev-client": "~1.0.1", "expo-facebook": "~12.2.0", "expo-google-app-auth": "~8.3.0", "expo-image-picker": "~13.1.1", "expo-location": "~14.2.2", "expo-notifications": "~0.15.4", - "expo-updates": "~0.13.3", + "expo-splash-screen": "~0.15.1", + "expo-system-ui": "~1.2.0", + "expo-updates": "~0.13.4", "firebase": "8.2.3", "jwt-decode": "^3.1.2", "logkitty": "^0.7.1", diff --git a/app/src/services/Firebase.js b/app/src/services/Firebase.js index d65d8500c..beb5b035b 100644 --- a/app/src/services/Firebase.js +++ b/app/src/services/Firebase.js @@ -1,13 +1,13 @@ import firebase from 'firebase'; import Constants from 'expo-constants'; import authConfig from '../config/authmiaajuda-firebase'; -import authConfigDEv from '../config/authmiaajuda-firebase-dev'; +import authConfigDev from '../config/authmiaajuda-firebase-dev'; class FirebaseService { constructor() { const env = Constants.manifest.releaseChannel; const { apiKey, authDomain, projectId } = - env == 'prod' ? authConfig : authConfigDEv; + env == 'prod' ? authConfig : authConfigDev; this.firebase = firebase.initializeApp({ apiKey, authDomain, diff --git a/app/yarn.lock b/app/yarn.lock index 8b01d7bd6..81819b273 100644 --- a/app/yarn.lock +++ b/app/yarn.lock @@ -1241,6 +1241,37 @@ slugify "^1.3.4" sucrase "^3.20.0" +"@expo/config@6.0.26": + version "6.0.26" + resolved "https://registry.yarnpkg.com/@expo/config/-/config-6.0.26.tgz#2c9255ab618a354c8c8bd97366d60992ed21195f" + integrity sha512-nMQaZl69r6CMJFhCj0xcGJN9bIi4Uws0k9K6q6rGFPFNarS0z0aexeyNLv93/J+hsTJVn0GEYtGz5Y/R8boXxw== + dependencies: + "@babel/code-frame" "~7.10.4" + "@expo/config-plugins" "4.1.5" + "@expo/config-types" "^45.0.0" + "@expo/json-file" "8.2.36" + getenv "^1.0.0" + glob "7.1.6" + require-from-string "^2.0.2" + resolve-from "^5.0.0" + semver "7.3.2" + slugify "^1.3.4" + sucrase "^3.20.0" + +"@expo/configure-splash-screen@^0.6.0": + version "0.6.0" + resolved "https://registry.yarnpkg.com/@expo/configure-splash-screen/-/configure-splash-screen-0.6.0.tgz#07d97ee512fd859fcc09506ba3762fd6263ebc39" + integrity sha512-4DyPoNXJqx9bN4nEwF3HQreo//ECu7gDe1Xor3dnnzFm9P/VDxAKdbEhA0n+R6fgkNfT2onVHWijqvdpTS3Xew== + dependencies: + color-string "^1.5.3" + commander "^5.1.0" + fs-extra "^9.0.0" + glob "^7.1.6" + lodash "^4.17.15" + pngjs "^5.0.0" + xcode "^3.0.0" + xml-js "^1.6.11" + "@expo/dev-server@~0.1.110": version "0.1.114" resolved "https://registry.yarnpkg.com/@expo/dev-server/-/dev-server-0.1.114.tgz#4859d106a0e810a0932127180006e46fe381edae" @@ -1305,7 +1336,7 @@ json5 "^1.0.1" write-file-atomic "^2.3.0" -"@expo/metro-config@0.3.18", "@expo/metro-config@~0.3.16", "@expo/metro-config@~0.3.7": +"@expo/metro-config@0.3.18", "@expo/metro-config@~0.3.16": version "0.3.18" resolved "https://registry.yarnpkg.com/@expo/metro-config/-/metro-config-0.3.18.tgz#72705b3a0a3fb863b1a068f2b5f4cb43828cb26b" integrity sha512-DWtwV67kD8X2uOKIs5QyHlHD+6L6RAgudZZDBmu433ZvL62HAUYfjEi3+i0jeMiUqN85o1vbXg6xqWnBCpS50g== @@ -1319,6 +1350,20 @@ resolve-from "^5.0.0" sucrase "^3.20.0" +"@expo/metro-config@0.3.19": + version "0.3.19" + resolved "https://registry.yarnpkg.com/@expo/metro-config/-/metro-config-0.3.19.tgz#fb962f3569681b9fe5b074182389ddd76013feb5" + integrity sha512-UZlwnD0g/7uAx/AZ5ulC7Y4unfJFJywXy3Ozu40dhQnSciOU/nkzK94XpKbxHuRZJ3crZxvL2EDwQ8jguDjASw== + dependencies: + "@expo/config" "6.0.26" + "@expo/json-file" "8.2.36" + chalk "^4.1.0" + debug "^4.3.2" + find-yarn-workspace-root "~2.0.0" + getenv "^1.0.0" + resolve-from "^5.0.0" + sucrase "^3.20.0" + "@expo/osascript@2.0.33", "@expo/osascript@^2.0.31": version "2.0.33" resolved "https://registry.yarnpkg.com/@expo/osascript/-/osascript-2.0.33.tgz#e9dcc8da54466c11939074aa71a006024ea884b1" @@ -3402,7 +3447,7 @@ color-name@^1.0.0, color-name@~1.1.4: resolved "https://registry.yarnpkg.com/color-name/-/color-name-1.1.4.tgz#c2a09a87acbde69543de6f63fa3995c826c536a2" integrity sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA== -color-string@^1.6.0: +color-string@^1.5.3, color-string@^1.6.0: version "1.9.1" resolved "https://registry.yarnpkg.com/color-string/-/color-string-1.9.1.tgz#4467f9146f036f855b764dfb5bf8582bf342c7a4" integrity sha512-shrVawQFojnZv6xM40anx4CkoDP+fZsw/ZerEMsW/pyzsRbElpsL/DBVW7q3ExxwusdNXI3lXpuhEZkzs8p5Eg== @@ -3458,6 +3503,11 @@ commander@^4.0.0: resolved "https://registry.yarnpkg.com/commander/-/commander-4.1.1.tgz#9fd602bd936294e9e9ef46a3f4d6964044b18068" integrity sha512-NOKm8xhkzAjzFx8B2v5OAHT+u5pRQc2UCa2Vq9jYL/31o2wi9mxBA7LIFs3sV5VSC49z6pEhfbMULvShKj26WA== +commander@^5.1.0: + version "5.1.0" + resolved "https://registry.yarnpkg.com/commander/-/commander-5.1.0.tgz#46abbd1652f8e059bddaef99bbdcb2ad9cf179ae" + integrity sha512-P0CysNDQ7rtVw4QIQtm+MRxV66vKFSvlsQvGYXZWR3qFU0jlMKHZZZgw8e+8DSah4UDKMqnknRDQz+xuQXQ/Zg== + commander@^6.2.0: version "6.2.1" resolved "https://registry.yarnpkg.com/commander/-/commander-6.2.1.tgz#0792eb682dfbc325999bb2b84fddddba110ac73c" @@ -4530,6 +4580,42 @@ expo-constants@~13.1.0, expo-constants@~13.1.1: "@expo/config" "^6.0.14" uuid "^3.3.2" +expo-dev-client@~1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/expo-dev-client/-/expo-dev-client-1.0.1.tgz#88edb3a60b5a758c0cc57b0326bdcb1ad1573e5a" + integrity sha512-LMtMvappEyq0AvX3QXeq4CQ/dbdiBwUm6exjBz3dCM7KhMbjJ26TxbYvS0DfxAJDXBlyjCLi8O4HAUb0U811/Q== + dependencies: + "@expo/config-plugins" "^4.0.14" + expo-dev-launcher "1.0.1" + expo-dev-menu "1.0.1" + expo-dev-menu-interface "0.7.0" + expo-manifests "~0.3.0" + expo-updates-interface "~0.6.0" + +expo-dev-launcher@1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/expo-dev-launcher/-/expo-dev-launcher-1.0.1.tgz#cb550399a23d7e4fcc34cc7f5fef20cff979c7c8" + integrity sha512-1JFhiqjZE67qVAg0tOqVC53/7dIefWgaJ7OQRdapWEiiqUeFFnWmwvaz8NcjsTJzsk5bepXrgW7QpIZYkUYniQ== + dependencies: + "@expo/config-plugins" "^4.0.14" + expo-dev-menu "1.0.1" + resolve-from "^5.0.0" + semver "^7.3.5" + +expo-dev-menu-interface@0.7.0: + version "0.7.0" + resolved "https://registry.yarnpkg.com/expo-dev-menu-interface/-/expo-dev-menu-interface-0.7.0.tgz#e141a671c7a34b921e7255653665d5e8489dab08" + integrity sha512-f/9gWLpuvXvQPeVBHH0T7qm4v2/Ynygs7dzebxqSWGDcCabfqRhuX+dv/t7CGu85m6waC9xYYnjLG7l8LC/i3Q== + +expo-dev-menu@1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/expo-dev-menu/-/expo-dev-menu-1.0.1.tgz#7d64953d5304c794d47bfd5f3861a47c7eef9d03" + integrity sha512-npDfYQorhI/EaJb2LRLxI9WqzyIrM3AXhHnaA6qNBtEMb5IwAmg4I7//2FqbCtama+sUkc8mEFqyUa4/DbhJ2Q== + dependencies: + "@expo/config-plugins" "^4.0.14" + expo-dev-menu-interface "0.7.0" + semver "^7.3.5" + expo-eas-client@~0.2.0: version "0.2.1" resolved "https://registry.yarnpkg.com/expo-eas-client/-/expo-eas-client-0.2.1.tgz#cf67459589e9fe8e90f377833593fd425f069501" @@ -4653,25 +4739,42 @@ expo-notifications@~0.15.4: fs-extra "^9.1.0" uuid "^3.4.0" +expo-splash-screen@~0.15.1: + version "0.15.1" + resolved "https://registry.yarnpkg.com/expo-splash-screen/-/expo-splash-screen-0.15.1.tgz#bdfb2434bda7fb1cde97e029fc7a791d7b3e3125" + integrity sha512-Yvz6p/ig+cQp9c1PLSm1YshpNJXRp/xtxajfwPq2kampf61zA+xnoMk+J6YcNeXeIlqHysj3ND2tMhEEQjM/ow== + dependencies: + "@expo/configure-splash-screen" "^0.6.0" + "@expo/prebuild-config" "~4.0.0" + expo-structured-headers@~2.2.0: version "2.2.1" resolved "https://registry.yarnpkg.com/expo-structured-headers/-/expo-structured-headers-2.2.1.tgz#739f969101de6bead921eee59e5899399ad67715" integrity sha512-nY6GuvoS/U5XdhfBNmvXGRoGzIXywXpSZs2wdiP+FbS79P9UWyEqzgARrBTF+6pQxUVMs6/vdffxRpwhjwYPug== +expo-system-ui@~1.2.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/expo-system-ui/-/expo-system-ui-1.2.0.tgz#dd8a80f11420cfc65ae25b7ce6de6b60a7aa5b0e" + integrity sha512-jynjFNz38FeY/2u4EKvLJdIk0hZAhicd9lbjSRJUDTjhGhQmYDsCQ32NKp/X3DwBkugAP5nwDwa5S3eGk5i80Q== + dependencies: + "@expo/config-plugins" "^4.0.14" + "@react-native/normalize-color" "^2.0.0" + debug "^4.3.2" + expo-updates-interface@~0.6.0: version "0.6.0" resolved "https://registry.yarnpkg.com/expo-updates-interface/-/expo-updates-interface-0.6.0.tgz#cef5250106e59572afdfcf245c534754c8c844ba" integrity sha512-oQcGTsE8mSkSxENPlWjZPGoJpt3RFDNPuO5d8shBDxBb4ZNH/W2ojavSFQMaLbNMoS0bYQQhzbRNEIBd306QMg== -expo-updates@~0.13.3: - version "0.13.3" - resolved "https://registry.yarnpkg.com/expo-updates/-/expo-updates-0.13.3.tgz#1e55ba2682de4633f2d1d0424078873868821361" - integrity sha512-aVO3Ha+vRGnkJbqlJMNoQn/p31DMnhZSGUs977ixhb0ff2xs530vf4/zVi4s635lkwuCd23++oga44Z4quKV/w== +expo-updates@~0.13.4: + version "0.13.4" + resolved "https://registry.yarnpkg.com/expo-updates/-/expo-updates-0.13.4.tgz#7ffca09721fdf3ba43eb413cab918010881f3b55" + integrity sha512-GrA88YT2WN0rY4+uDHm7Yb3Gt7hAtVkaGq3ANIDbtIDVarvnHJ4d7cSp0U+FAyhtJCOPRo0QjF/Gy8rpP/G4yw== dependencies: "@expo/code-signing-certificates" "0.0.1" - "@expo/config" "^6.0.14" + "@expo/config" "~6.0.23" "@expo/config-plugins" "^4.0.14" - "@expo/metro-config" "~0.3.7" + "@expo/metro-config" "0.3.19" arg "4.1.0" expo-eas-client "~0.2.0" expo-manifests "~0.3.0" @@ -7786,6 +7889,11 @@ pngjs@^3.3.0: resolved "https://registry.yarnpkg.com/pngjs/-/pngjs-3.4.0.tgz#99ca7d725965fb655814eaf65f38f12bbdbf555f" integrity sha512-NCrCHhWmnQklfH4MtJMRjZ2a8c80qXeMlQMv2uVp9ISJMTt562SbGd6n2oq0PaPgKm7Z6pL9E2UlLIhC+SHL3w== +pngjs@^5.0.0: + version "5.0.0" + resolved "https://registry.yarnpkg.com/pngjs/-/pngjs-5.0.0.tgz#e79dd2b215767fd9c04561c01236df960bce7fbb" + integrity sha512-40QW5YalBNfQo5yRYmiw7Yz6TKKVr3h6970B2YE+3fQpsWcrbj1PzJgxeJ19DRQjhMbKPIuMY8rFaXc8moolVw== + posix-character-classes@^0.1.0: version "0.1.1" resolved "https://registry.yarnpkg.com/posix-character-classes/-/posix-character-classes-0.1.1.tgz#01eac0fe3b5af71a2a6c02feabb8c1fef7e00eab" @@ -10004,6 +10112,13 @@ xcode@^3.0.0, xcode@^3.0.1: simple-plist "^1.1.0" uuid "^7.0.3" +xml-js@^1.6.11: + version "1.6.11" + resolved "https://registry.yarnpkg.com/xml-js/-/xml-js-1.6.11.tgz#927d2f6947f7f1c19a316dd8eea3614e8b18f8e9" + integrity sha512-7rVi2KMfwfWFl+GpPg6m80IVMWXLRjO+PxTq7V2CDhoGak0wzYzFgUY2m4XJ47OGdXd8eLE8EmwfAmdjw7lC1g== + dependencies: + sax "^1.2.4" + xml2js@0.4.23: version "0.4.23" resolved "https://registry.yarnpkg.com/xml2js/-/xml2js-0.4.23.tgz#a0c69516752421eb2ac758ee4d4ccf58843eac66" From 689787dc6aaca63076fac0974f2c914fa45b1104 Mon Sep 17 00:00:00 2001 From: RcleydsonR Date: Mon, 8 Aug 2022 13:29:14 -0300 Subject: [PATCH 03/13] feat: add initial submit script to verify the latest expo url build --- .github/workflows/submit.yml | 57 ++++++++++++++++++++++++++++++++++++ 1 file changed, 57 insertions(+) create mode 100644 .github/workflows/submit.yml diff --git a/.github/workflows/submit.yml b/.github/workflows/submit.yml new file mode 100644 index 000000000..66aca15af --- /dev/null +++ b/.github/workflows/submit.yml @@ -0,0 +1,57 @@ +name: submit app to play store + + +on : + push : + branches : [ master, 215-EntregaContínua ] + +jobs: + submit: + runs-on: ubuntu-latest + defaults: + run: + shell: bash + working-directory: ./app + + steps: + - name: 🏗 Setup repo + uses: actions/checkout@v3 + + - name: 🏗 Setup node + uses: actions/setup-node@v3 + with: + node-version: 16.x + cache: yarn + cache-dependency-path: app/yarn.lock + + - name: 🏗 Config files + run: | + echo "$GOOGLE_SERVICES" > google-services.json + echo "$FIREBASE_CONFIG_DEV" > ./src/config/authmiaajuda-firebase-dev.json + echo "$FIREBASE_CONFIG" > ./src/config/authmiaajuda-firebase.json + echo "$ENV_VARIABLE" > .env + echo "$SERVICE_ACCOUNT_KEY" > ./serviceAccountKey.json + env: + GOOGLE_SERVICES: ${{ secrets.GOOGLE_SERVICES }} + FIREBASE_CONFIG_DEV: ${{ secrets.FIREBASE_CONFIG_DEV }} + FIREBASE_CONFIG: ${{ secrets.FIREBASE_CONFIG }} + ENV_VARIABLE: ${{ secrets.ENV_VARIABLE }} + SERVICE_ACCOUNT_KEY: ${{ secrets.SERVICE_ACCOUNT_KEY }} + + - name: 🏗 Setup Expo and EAS + uses: expo/expo-github-action@v7 + with: + expo-version: latest + eas-version: latest + token: ${{ secrets.EXPO_TOKEN }} + + - name: 📦 Install dependencies + run: yarn install --pure-lockfile --non-interactive + + - name: Retrieve last build url version + run: echo "BUILD_URL=$(expo url:apk)" >> $GITHUB_ENV + + - name: Print the last build url version + run: echo "${{ env.BUILD_URL }}" + # - name: 📦 Build prod aab by expo build + # run: expo build:android -t app-bundle --release-channel=prod --non-interactive \ No newline at end of file From 414ea5fb3d0cac623a33dfff1bac25943fb35dab Mon Sep 17 00:00:00 2001 From: RcleydsonR Date: Mon, 8 Aug 2022 16:21:52 -0300 Subject: [PATCH 04/13] feat: add script as alpha_test to test if the script submit to right profile --- .github/workflows/submit.yml | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/.github/workflows/submit.yml b/.github/workflows/submit.yml index 66aca15af..77a90ac35 100644 --- a/.github/workflows/submit.yml +++ b/.github/workflows/submit.yml @@ -48,10 +48,11 @@ jobs: - name: 📦 Install dependencies run: yarn install --pure-lockfile --non-interactive - - name: Retrieve last build url version - run: echo "BUILD_URL=$(expo url:apk)" >> $GITHUB_ENV + - name: 📦 Build prod aab by expo build + run: expo build:android -t app-bundle --release-channel=prod --non-interactive - - name: Print the last build url version - run: echo "${{ env.BUILD_URL }}" - # - name: 📦 Build prod aab by expo build - # run: expo build:android -t app-bundle --release-channel=prod --non-interactive \ No newline at end of file + - name: 📦 Retrieve last build url version + run: echo "BUILD_URL=$(expo url:apk)" >> $GITHUB_ENV + + - name: 📦 Submit latest aab build to play store as production app + run: eas submit -p android --profile alpha_test --url ${{ env.BUILD_URL }} \ No newline at end of file From 13b2167ae43ec4e5ee46a255e090495efb050634 Mon Sep 17 00:00:00 2001 From: RcleydsonR Date: Mon, 8 Aug 2022 17:06:13 -0300 Subject: [PATCH 05/13] fix: add runner trigger only to master submitting the app to production profile --- .github/workflows/submit.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/submit.yml b/.github/workflows/submit.yml index 77a90ac35..afbad2cb1 100644 --- a/.github/workflows/submit.yml +++ b/.github/workflows/submit.yml @@ -3,7 +3,7 @@ name: submit app to play store on : push : - branches : [ master, 215-EntregaContínua ] + branches : [ master ] jobs: submit: @@ -55,4 +55,4 @@ jobs: run: echo "BUILD_URL=$(expo url:apk)" >> $GITHUB_ENV - name: 📦 Submit latest aab build to play store as production app - run: eas submit -p android --profile alpha_test --url ${{ env.BUILD_URL }} \ No newline at end of file + run: eas submit -p android --url ${{ env.BUILD_URL }} \ No newline at end of file From 49abf0745157ad56bf4846333878237feadad325 Mon Sep 17 00:00:00 2001 From: RcleydsonR Date: Tue, 23 Aug 2022 22:49:10 -0300 Subject: [PATCH 06/13] feat: add lint step at build script --- .github/workflows/{deploy.yml => build.yml} | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) rename .github/workflows/{deploy.yml => build.yml} (96%) diff --git a/.github/workflows/deploy.yml b/.github/workflows/build.yml similarity index 96% rename from .github/workflows/deploy.yml rename to .github/workflows/build.yml index 5d671c423..20b0a85e1 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/build.yml @@ -12,7 +12,7 @@ concurrency: cancel-in-progress: true jobs: - deploy: + build-deploy: runs-on: ubuntu-latest defaults: run: @@ -51,6 +51,9 @@ jobs: - name: 📦 Install dependencies run: yarn install --pure-lockfile --non-interactive + - name: 📦 Run lint + run: yarn lint + - name: 📦 Publish staging if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/develop' }} run: expo publish --release-channel=staging --non-interactive From 3b0f457fba6b888f8fc8e049a8d235f509768045 Mon Sep 17 00:00:00 2001 From: RcleydsonR Date: Tue, 23 Aug 2022 22:54:18 -0300 Subject: [PATCH 07/13] fix: lint files --- app/.eslintrc.js | 1 + .../MainNavigation/BottomNavigator/index.js | 3 +- .../FAQModals/EmergencyNumbersModal/index.js | 6 ++- .../HowToChoseHelpOfferModal/index.js | 6 ++- .../HowToCreateHelpModal/index.js | 6 ++- .../HowToOfferHelpModal/index.js | 6 ++- .../HowToVolunteerModal/index.js | 6 ++- .../FAQModals/HowToUseModal/index.js | 39 ++++++++++--------- .../HelpOfferedModal/index.js | 6 ++- .../HelpRequestModal/index.js | 6 ++- app/src/components/FaqCard/index.js | 3 +- app/src/components/HistoricCard/index.js | 9 +++-- app/src/components/NoHelps/index.js | 3 +- .../components/SelectCategoryForm/index.js | 6 ++- .../UI/button/FilterButtons/index.js | 9 +++-- .../modals/category/CategoryList/index.js | 26 ++++++++----- .../modals/category/CategorySelector/index.js | 9 +++-- .../category/categoryDescription/index.js | 6 ++- .../modals/conditionTermsModal/index.js | 9 +++-- .../modals/confirmationModal/index.js | 3 +- .../modals/newHelpModal/failure/index.js | 3 +- .../modals/newHelpModal/success/index.js | 3 +- .../modals/privacyPolicyModal/index.js | 9 +++-- app/src/pages/IntroSlides/index.js | 9 +++-- app/src/pages/Main/UserMarker/index.js | 3 +- .../contexts/deviceInformationContext.js | 3 +- app/src/utils/emailValidator.js | 3 +- 27 files changed, 126 insertions(+), 75 deletions(-) diff --git a/app/.eslintrc.js b/app/.eslintrc.js index 7397352e1..80e483115 100644 --- a/app/.eslintrc.js +++ b/app/.eslintrc.js @@ -25,6 +25,7 @@ module.exports = { 'react/display-name': 'off', 'react/prop-types': 'off', 'prettier/prettier': 'error', + 'no-control-regex': 0, }, settings: { react: { diff --git a/app/src/Navigation/MainNavigation/BottomNavigator/index.js b/app/src/Navigation/MainNavigation/BottomNavigator/index.js index 190c0e739..a24928e4a 100644 --- a/app/src/Navigation/MainNavigation/BottomNavigator/index.js +++ b/app/src/Navigation/MainNavigation/BottomNavigator/index.js @@ -23,7 +23,8 @@ const BottomTab = () => { navigationIconsConfig(focused, route), })} initialRouteName="main" - backBehavior="initialRoute"> + backBehavior="initialRoute" + > setVisible(false)} - animationType="fade"> + animationType="fade" + > { setVisible(false); }} - style={styles.icon}> + style={styles.icon} + > setVisible(false)} - animationType="fade"> + animationType="fade" + > { setVisible(false); }} - style={styles.icon}> + style={styles.icon} + > setVisible(false)} - animationType="fade"> + animationType="fade" + > { setVisible(false); }} - style={styles.icon}> + style={styles.icon} + > setVisible(false)} - animationType="fade"> + animationType="fade" + > { setVisible(false); }} - style={styles.icon}> + style={styles.icon} + > setVisible(false)} - animationType="fade"> + animationType="fade" + > { setVisible(false); }} - style={styles.icon}> + style={styles.icon} + > ( { setHowToCreateHelpModalVisible(!howToCreateHelpModalVisible); }} - style={styles.textButtons}> + style={styles.textButtons} + > Como criar um pedido de ajuda? @@ -43,7 +38,8 @@ export default function HowToUseModal({ visible, setVisible }) { onPress={() => { setHowToOfferHelpModalVisible(!howToOfferHelpModalVisible); }} - style={styles.textButtons}> + style={styles.textButtons} + > Como criar uma oferta de ajuda? @@ -57,7 +53,8 @@ export default function HowToUseModal({ visible, setVisible }) { !howToChoseHelpOfferModalVisible, ); }} - style={styles.textButtons}> + style={styles.textButtons} + > Como escolher uma oferta de ajuda? @@ -69,7 +66,8 @@ export default function HowToUseModal({ visible, setVisible }) { onPress={() => { setHowToVolunteerModalVisible(!howToVolunteerModalVisible); }} - style={styles.textButtons}> + style={styles.textButtons} + > Como ser um voluntário? ); @@ -79,20 +77,23 @@ export default function HowToUseModal({ visible, setVisible }) { visible={visible} animationType="fade" transparent - onRequestClose={() => setVisible(false)}> + onRequestClose={() => setVisible(false)} + > { setVisible(false); - }}> + }} + > { setVisible(false); }} - style={styles.closeIcon}> + style={styles.closeIcon} + > setVisible(false)} - animationType="fade"> + animationType="fade" + > { setVisible(false); }} - style={styles.icon}> + style={styles.icon} + > setVisible(false)} - animationType="fade"> + animationType="fade" + > { setVisible(false); }} - style={styles.icon}> + style={styles.icon} + > { setModalVisible(!modalVisible); - }}> + }} + > {renderSVGIcon(faq.id)} diff --git a/app/src/components/HistoricCard/index.js b/app/src/components/HistoricCard/index.js index 25c14e718..ceba3f812 100644 --- a/app/src/components/HistoricCard/index.js +++ b/app/src/components/HistoricCard/index.js @@ -8,7 +8,8 @@ export default function HistoricCard({ object, isRiskGroup, children }) { isRiskGroup ? styles.cardContainerRiskGroup : styles.cardContainer - }> + } + > {object.title} @@ -21,13 +22,15 @@ export default function HistoricCard({ object, isRiskGroup, children }) { + style={styles.imageBackground} + > {object.categories.map((category) => ( + style={styles.categoryWarning} + > {category.name} diff --git a/app/src/components/NoHelps/index.js b/app/src/components/NoHelps/index.js index 42abed1e4..5f54011bf 100644 --- a/app/src/components/NoHelps/index.js +++ b/app/src/components/NoHelps/index.js @@ -14,7 +14,8 @@ export default function NoHelps({ title, color }) { color == 'light' ? styles.emptyListTextLight : styles.emptyListTextPrimary - }> + } + > {title} diff --git a/app/src/components/SelectCategoryForm/index.js b/app/src/components/SelectCategoryForm/index.js index 1e8306b43..ca73da27c 100644 --- a/app/src/components/SelectCategoryForm/index.js +++ b/app/src/components/SelectCategoryForm/index.js @@ -17,7 +17,8 @@ export default function SelectCategoryForm({ const renderPickerCategoryForm = () => ( + onPress={openCategoryModal} + > Categorias + ); @@ -30,7 +31,8 @@ export default function SelectCategoryForm({ return ( + style={styles.categoryName} + > {category.name} ); diff --git a/app/src/components/UI/button/FilterButtons/index.js b/app/src/components/UI/button/FilterButtons/index.js index cfd1e2c3f..c5f5a6504 100644 --- a/app/src/components/UI/button/FilterButtons/index.js +++ b/app/src/components/UI/button/FilterButtons/index.js @@ -44,13 +44,15 @@ export default function FilterButtons({ style={styles.helpFilterButton} onPress={() => { selectionFilter(filterButton.id); - }}> + }} + > + } + > + } + > {filterButton.name} diff --git a/app/src/components/modals/category/CategoryList/index.js b/app/src/components/modals/category/CategoryList/index.js index 17aeade9c..fff7f8fd1 100644 --- a/app/src/components/modals/category/CategoryList/index.js +++ b/app/src/components/modals/category/CategoryList/index.js @@ -22,9 +22,8 @@ export default function CategoryList({ setSelectedMarker, selectedMarker, }) { - const [descriptionModalVisible, setDescriptionModalVisible] = useState( - false, - ); + const [descriptionModalVisible, setDescriptionModalVisible] = + useState(false); const { categories, setSelectedCategories, @@ -85,7 +84,8 @@ export default function CategoryList({ const renderCategories = () => ( + showsVerticalScrollIndicator={false} + > {categories.map((category) => { return ( { selectCategory(category._id); - }}> + }} + > {category.name} @@ -143,7 +144,8 @@ export default function CategoryList({ style={[ styles.onGoingFinishedButtons, { marginRight: 10 }, - ]}> + ]} + > EM ANDAMENTO @@ -163,13 +165,15 @@ export default function CategoryList({ visible={visible} animationType="fade" transparent - onRequestClose={() => setVisible(false)}> + onRequestClose={() => setVisible(false)} + > { setVisible(false); - }}> + }} + > FILTRO @@ -177,7 +181,8 @@ export default function CategoryList({ onPress={() => { setVisible(false); }} - style={styles.closeIcon}> + style={styles.closeIcon} + > + }} + > { selectCategory(category._id); - }}> + }} + > {category.name} @@ -129,11 +130,13 @@ export default function CategorySelector({ visible={modalVisible} transparent onRequestClose={hideModal} - animationType="fade"> + animationType="fade" + > + onPress={hideModal} + > {renderCloseButton()} diff --git a/app/src/components/modals/category/categoryDescription/index.js b/app/src/components/modals/category/categoryDescription/index.js index 03a26b816..0ac7dfcdd 100644 --- a/app/src/components/modals/category/categoryDescription/index.js +++ b/app/src/components/modals/category/categoryDescription/index.js @@ -14,14 +14,16 @@ export default function CategoryDescriptionModal({ visible, setVisible }) { visible={visible} transparent animationType="fade" - onRequestClose={() => setVisible(false)}> + onRequestClose={() => setVisible(false)} + > { setVisible(false); }} - style={styles.icon}> + style={styles.icon} + > setVisible(false)} - animationType="slide"> + animationType="slide" + > setVisible(false)}> + onPress={() => setVisible(false)} + > + showsVerticalScrollIndicator={false} + > {terms} diff --git a/app/src/components/modals/confirmationModal/index.js b/app/src/components/modals/confirmationModal/index.js index dfe34d24a..ea5a694ee 100644 --- a/app/src/components/modals/confirmationModal/index.js +++ b/app/src/components/modals/confirmationModal/index.js @@ -46,7 +46,8 @@ export default function ConfirmationModal({ setVisible(false)} - activeOpacity={1}> + activeOpacity={1} + > {isLoading diff --git a/app/src/components/modals/newHelpModal/failure/index.js b/app/src/components/modals/newHelpModal/failure/index.js index bda6e30d5..9706a520b 100644 --- a/app/src/components/modals/newHelpModal/failure/index.js +++ b/app/src/components/modals/newHelpModal/failure/index.js @@ -10,7 +10,8 @@ export default function NewHelpModal({ visible, onOkPressed, errorMessage }) { transparent={true} style={styles.modal} animationType="fade" - visible={visible}> + visible={visible} + > {errorMessage || diff --git a/app/src/components/modals/newHelpModal/success/index.js b/app/src/components/modals/newHelpModal/success/index.js index 4c33935a7..8f533720b 100644 --- a/app/src/components/modals/newHelpModal/success/index.js +++ b/app/src/components/modals/newHelpModal/success/index.js @@ -10,7 +10,8 @@ export default function NewHelpModal({ visible, onOkPressed, message }) { transparent={true} style={styles.modal} animationType="fade" - visible={visible}> + visible={visible} + > {message}