diff --git a/.gitignore b/.gitignore index 39eb671..b66b524 100644 --- a/.gitignore +++ b/.gitignore @@ -79,3 +79,4 @@ scripts/config.json **/*.cer **/*.p12 **/*.mobileprovision +**/report.xml diff --git a/.travis.yml b/.travis.yml index 7b1ec54..79533ee 100644 --- a/.travis.yml +++ b/.travis.yml @@ -45,6 +45,11 @@ matrix: - git config --local user.email "info@geovation.uk" - export TRAVIS_TAG=${binary:-$(date +'%Y%m%d%H%M%S')-$(git log --format=%h -1)} - git tag $TRAVIS_TAG +# - gem install fastlane -NV + + env: + - secure: "CLic/Dhru12PIvTZrBKQIV7YXiiH216Nd0ku0t89sZ+QHVeuuyJZaYPEdP/eFtl9aoN8CEazIkFOgjYjJqhkN6ilYPp3IaQ2s8lbu+gzCi3jcBDGCxwxUGipFiCSZWYHx4xwVg4SPi9mmJYjsHMSsh65meLtJE6hQ5TBcFbCyjt/b5Be2Y3n3w5fZvrBl94hrVxjI1rv3R2a1/PACIfuArvFtEO2FQl+3mq565qyNVAuY2282PocDMY7qp896HUGefBjByoPb21oOQhbnStLBga1nmNjPqYGZG6KIkmTz52yjLRSwXCPwrKHWDlzarGoIGF0EpHF7FvvZnVN8SA0hx4hTaD43ewsNhORg08dGBvFDCWgsQn7XOgheJT6KXHx8kBjWGLEDBssQTh79siGQe0IGJgUixTht1c+OqXOWhHRoD+Cyz1Wnwc0APOS39vT+Nz3oPS1L7UbrcWq8Stk/A/ZDfpxCz55UJ07KbXzyy/U6/0XupMUG/k5hY8HSET9GhLxsVpeMysrIAszOa0ffJDfr+52VvnWWVlCu/DYvbmk3aOF1g/Ke+Ar0p/ZTFgFx5pobaAkcBGkXwRke5HJEFM1bmMvxUILJp3NANeqsZDJHLY57T/2PM1S0dj+PdaFj3iQ7y/7YjS3s+c0YmEZFpx3zOHZDh1X5sjMTenr8Bw=" + deploy: - provider: firebase skip_cleanup: true @@ -55,6 +60,10 @@ matrix: secure: X29iYfl6eW1lGrzk2B8VlZsYi0iCeLE18ZCp23LUPuLqGWEVne/SQf/wwf0EmMoBRBG4X+cs/xFzraA4wdpMXmwJjJo+XvH9SFIw2jfVKwHHwpWnLGcq/9mK14p4tUB5TxhCboH67UqmZqqV2MJ9cuJeEQSxaY0Dh1pOxJruftpXp+mKjoLB2hEhY82Yu+NA0k0JwSdCfb0opPIXelqNmrjgwuLpQgnvKjMK9Mu9meGFwdOYa8dq3oMetLknTcro6IX2DMuxCYR7qUq1BcnA+1vnu/UsvZyRy/25I890WK3B0uVs6NiIwmNNrctxViOmBCo6wInLxqfTKBgHB2DAHJavlQZMMaj/7o81+YF4Egpi7t9XE7BR1DPWxMsDxTHHWIcgWsr25Yk7aFAH+3yEDexqxSscYQvMM5ISsX8ofvFCLRYwyAAjWib04d1SoEKTfrua9pL/TRx0J1Y7lJ21wnj4kbzmstuCvDLxt9QzEY9WXC/AQnkYz1CpuR7QIGZKxyYU/7aZbLjQfAaQp0GnAHxiwwAS9ofIovEh18Q2r1BGIpCnI4Zosfq/5eTY9dz+JCpKvOr52HqT+up7OiPbfIbtmXYS38Go/MMOLlMnRN6bvbQQHc2Al8S0c29WZtpOfkRcqbpx+fcZ80UexEouCKkmrIROXEWruZDMTBMcD2k= file: cordova-app/platforms/android/app/build/outputs/apk/release/app-release.apk skip_cleanup: true +# - provider: script +# skip_cleanup: true +# script: npm run beta:android + - os: osx if: tag IS blank language: objective-c @@ -63,6 +72,8 @@ matrix: - '8' env: - secure: jfdXsl7ajV/xQNW47p1yyEKDkMfxMRqOQE6U/vmGTKA78SLwvCYYjQUksXh8Tupoiz71mDF5qzUL7Y1tuKONlFeMOh4Qmkcyom33+lzPUeiF3lQpPocLNMP2Y77HnuKQiPb9dpdPAzpAHoVrETTSW+XX03qzb2okojx80t2QDUlhieZ6qVTWWtpaRG3P+nv8Ms/cBMBRlOJ+dLLMa6o1rOOlYJnr2ARwJfvezY0S/OvDx+lX4C4MnRp3emCLK+2tzAPrZ3kNn/9jYmgdIybDSqMpCiPfSF3vrOfOakpefVINLbafI1qJ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YJmlJYBqLSq+nXtpsixNLc69Njk7f+LhI0qH2QjZsgZHyFGlo5UL7X52Qy6VwvXZuVSUYpJYD/nzMLtWelVMXIF5vz9P2aOiFTTdbd3tnF2xYP/9qsI9h6rFED7zAYe1Wogdz0UdmLjXQUCnPr5M3wEuf7SyuUMSI9p7N+T2bGqefqfKdCHuRQgwTjIO3G2oPpqkj6q5k26ckt8LOaz5M3S9xLAxjE33VbCAO9wvTTnF/cgmC2K63rkUogsK7//IM1BG9p4IVUqXSCYYpbgA+/Hk/U9plIZgDFk8cHW7pMhIjP+NgQ/o1RBFwOztHYhdimc4pBSqidH+xyCDuD31iR6Ej1bD94sAmvOWFj2MBSf3NYpzl2R5qrN6h7Py7ZHQTUtWLLSFmB/t3qx3bgLECca2saSS6EyJmatPdBJQW6kw0aJdYrBgJOqUQk4v6YJ6+wVEhwKnqN6tn7Bsux0Y2sWLANwXXYi2BZly0X2MYPqvNb1VSVqzVIhd3qtyfsT+PMh34/1+XANS7FyJ/Os5taLTKZL1YfSGWyalNETFYLIbJIuBkcHfvjxlGF/RdcF3W8xy1wVTNkGLkDJPuNt6T3Pqj9NZCkyxvBQm9Pepe4T7ktcIF8N0sBL/K2eo581VfyF50yaTQoMd6Axx7nK4ma7tdSVq2njs=" cache: directories: - node_modules/ @@ -78,3 +89,20 @@ matrix: - npm run build:ios install: - npm install + before_deploy: + - npm run build + - git config --local user.name "Geovation from Travis" + - git config --local user.email "info@geovation.uk" + - export TRAVIS_TAG=${binary:-$(date +'%Y%m%d%H%M%S')-$(git log --format=%h -1)} + - git tag $TRAVIS_TAG +# - gem install fastlane -NV + deploy: + - provider: releases + api_key: + secure: X29iYfl6eW1lGrzk2B8VlZsYi0iCeLE18ZCp23LUPuLqGWEVne/SQf/wwf0EmMoBRBG4X+cs/xFzraA4wdpMXmwJjJo+XvH9SFIw2jfVKwHHwpWnLGcq/9mK14p4tUB5TxhCboH67UqmZqqV2MJ9cuJeEQSxaY0Dh1pOxJruftpXp+mKjoLB2hEhY82Yu+NA0k0JwSdCfb0opPIXelqNmrjgwuLpQgnvKjMK9Mu9meGFwdOYa8dq3oMetLknTcro6IX2DMuxCYR7qUq1BcnA+1vnu/UsvZyRy/25I890WK3B0uVs6NiIwmNNrctxViOmBCo6wInLxqfTKBgHB2DAHJavlQZMMaj/7o81+YF4Egpi7t9XE7BR1DPWxMsDxTHHWIcgWsr25Yk7aFAH+3yEDexqxSscYQvMM5ISsX8ofvFCLRYwyAAjWib04d1SoEKTfrua9pL/TRx0J1Y7lJ21wnj4kbzmstuCvDLxt9QzEY9WXC/AQnkYz1CpuR7QIGZKxyYU/7aZbLjQfAaQp0GnAHxiwwAS9ofIovEh18Q2r1BGIpCnI4Zosfq/5eTY9dz+JCpKvOr52HqT+up7OiPbfIbtmXYS38Go/MMOLlMnRN6bvbQQHc2Al8S0c29WZtpOfkRcqbpx+fcZ80UexEouCKkmrIROXEWruZDMTBMcD2k= + file: cordova-app/platforms/ios/build/device/Plastic\ Patrol.ipa + skip_cleanup: true + +# - provider: script +# skip_cleanup: true +# script: npm run beta:ios diff --git a/cordova-app/config.xml b/cordova-app/config.xml index 28ab6c4..492280d 100644 --- a/cordova-app/config.xml +++ b/cordova-app/config.xml @@ -1,5 +1,5 @@ - + Plastic Patrol Fighting Plastic Pollution in the UK Waterways. @@ -59,5 +59,4 @@ - diff --git a/cordova-app/fastlane/Appfile b/cordova-app/fastlane/Appfile new file mode 100644 index 0000000..f375a6d --- /dev/null +++ b/cordova-app/fastlane/Appfile @@ -0,0 +1,13 @@ +# app_identifier("[[APP_IDENTIFIER]]") # The bundle identifier of your app +# apple_id("[[APPLE_ID]]") # Your Apple email address + + +# For more information about the Appfile, see: +# https://docs.fastlane.tools/advanced/#appfile + + +app_identifier "com.lewismakesapps.Plastic-Patrol" +package_name "uk.co.plasticpatrol" +apple_id "it@geovation.uk" +team_name "Plastic Patrol CIC" +itc_team_name "Plastic Patrol CIC" diff --git a/cordova-app/fastlane/Fastfile b/cordova-app/fastlane/Fastfile new file mode 100644 index 0000000..d31924c --- /dev/null +++ b/cordova-app/fastlane/Fastfile @@ -0,0 +1,39 @@ +# This file contains the fastlane.tools configuration +# You can find the documentation at https://docs.fastlane.tools +# +# For a list of all available actions, check out +# +# https://docs.fastlane.tools/actions +# +# For a list of all available plugins, check out +# +# https://docs.fastlane.tools/plugins/available-plugins +# + +# Uncomment the line if you want fastlane to automatically update itself +update_fastlane + +# default_platform(:ios) + +platform :ios do + desc "deploy ios to test flight" + lane :beta do + upload_to_testflight( + ipa: "platforms/ios/build/device/Plastic Patrol.ipa", + distribute_external: false, + skip_waiting_for_build_processing: true, + changelog: ENV["TRAVIS_COMMIT_MESSAGE"] + ) + end +end + +platform :android do + desc "deploy android to beta" + lane :beta do + upload_to_play_store( + apk: "./platforms/android/app/build/outputs/apk/release/app-release.apk", + track: "beta", + json_key: "GooglePlayAndroidDeveloper.json" + ) + end +end diff --git a/cordova-app/fastlane/README.md b/cordova-app/fastlane/README.md new file mode 100644 index 0000000..634cba4 --- /dev/null +++ b/cordova-app/fastlane/README.md @@ -0,0 +1,29 @@ +fastlane documentation +================ +# Installation + +Make sure you have the latest version of the Xcode command line tools installed: + +``` +xcode-select --install +``` + +Install _fastlane_ using +``` +[sudo] gem install fastlane -NV +``` +or alternatively using `brew cask install fastlane` + +# Available Actions +## iOS +### ios beta +``` +fastlane ios beta +``` +Description of what the lane does + +---- + +This README.md is auto-generated and will be re-generated every time [fastlane](https://fastlane.tools) is run. +More information about fastlane can be found on [fastlane.tools](https://fastlane.tools). +The documentation of fastlane can be found on [docs.fastlane.tools](https://docs.fastlane.tools). diff --git a/cordova-app/package-lock.json b/cordova-app/package-lock.json index 5425306..80e76fd 100644 --- a/cordova-app/package-lock.json +++ b/cordova-app/package-lock.json @@ -16,216 +16,6 @@ "integrity": "sha1-BDP0TYCWgP3rYO0mDxsMJi6CpAs=", "dev": true }, - "cordova-android": { - "version": "7.1.4", - "resolved": "https://registry.npmjs.org/cordova-android/-/cordova-android-7.1.4.tgz", - "integrity": "sha512-Rtvu002I83uzfVyCsE6p2krFKVHt9TSAqZUATes+zH+o9cdxYGrLHY+PKCQo4SLCdSMdrkIHCDnQPTYTp/d7+g==", - "requires": { - "abbrev": "*", - "android-versions": "1.4.0", - "ansi": "*", - "balanced-match": "*", - "base64-js": "1.2.0", - "big-integer": "1.6.32", - "bplist-parser": "*", - "brace-expansion": "*", - "concat-map": "*", - "cordova-common": "2.2.5", - "cordova-registry-mapper": "*", - "elementtree": "0.1.6", - "glob": "5.0.15", - "inflight": "*", - "inherits": "*", - "minimatch": "*", - "nopt": "3.0.1", - "once": "*", - "path-is-absolute": "1.0.1", - "plist": "2.1.0", - "properties-parser": "0.2.3", - "q": "1.4.1", - "sax": "0.3.5", - "semver": "5.5.0", - "shelljs": "0.5.3", - "underscore": "*", - "unorm": "*", - "wrappy": "*", - "xmlbuilder": "8.2.2", - "xmldom": "*" - }, - "dependencies": { - "abbrev": { - "version": "1.1.1", - "bundled": true - }, - "android-versions": { - "version": "1.4.0", - "bundled": true, - "requires": { - "semver": "^5.4.1" - } - }, - "ansi": { - "version": "0.3.1", - "bundled": true - }, - "balanced-match": { - "version": "1.0.0", - "bundled": true - }, - "base64-js": { - "version": "1.2.0", - "bundled": true - }, - "big-integer": { - "version": "1.6.32", - "bundled": true - }, - "bplist-parser": { - "version": "0.1.1", - "bundled": true, - "requires": { - "big-integer": "^1.6.7" - } - }, - "brace-expansion": { - "version": "1.1.11", - "bundled": true, - "requires": { - "balanced-match": "^1.0.0", - "concat-map": "0.0.1" - } - }, - "concat-map": { - "version": "0.0.1", - "bundled": true - }, - "cordova-common": { - "version": "2.2.5", - "bundled": true, - "requires": { - "ansi": "^0.3.1", - "bplist-parser": "^0.1.0", - "cordova-registry-mapper": "^1.1.8", - "elementtree": "0.1.6", - "glob": "^5.0.13", - "minimatch": "^3.0.0", - "plist": "^2.1.0", - "q": "^1.4.1", - "shelljs": "^0.5.3", - "underscore": "^1.8.3", - "unorm": "^1.3.3" - } - }, - "cordova-registry-mapper": { - "version": "1.1.15", - "bundled": true - }, - "elementtree": { - "version": "0.1.6", - "bundled": true, - "requires": { - "sax": "0.3.5" - } - }, - "glob": { - "version": "5.0.15", - "bundled": true, - "requires": { - "inflight": "^1.0.4", - "inherits": "2", - "minimatch": "2 || 3", - "once": "^1.3.0", - "path-is-absolute": "^1.0.0" - } - }, - "inflight": { - "version": "1.0.6", - "bundled": true, - "requires": { - "once": "^1.3.0", - "wrappy": "1" - } - }, - "inherits": { - "version": "2.0.3", - "bundled": true - }, - "minimatch": { - "version": "3.0.4", - "bundled": true, - "requires": { - "brace-expansion": "^1.1.7" - } - }, - "nopt": { - "version": "3.0.1", - "bundled": true, - "requires": { - "abbrev": "1" - } - }, - "once": { - "version": "1.4.0", - "bundled": true, - "requires": { - "wrappy": "1" - } - }, - "path-is-absolute": { - "version": "1.0.1", - "bundled": true - }, - "plist": { - "version": "2.1.0", - "bundled": true, - "requires": { - "base64-js": "1.2.0", - "xmlbuilder": "8.2.2", - "xmldom": "0.1.x" - } - }, - "properties-parser": { - "version": "0.2.3", - "bundled": true - }, - "q": { - "version": "1.4.1", - "bundled": true - }, - "sax": { - "version": "0.3.5", - "bundled": true - }, - "semver": { - "version": "5.5.0", - "bundled": true - }, - "shelljs": { - "version": "0.5.3", - "bundled": true - }, - "underscore": { - "version": "1.9.1", - "bundled": true - }, - "unorm": { - "version": "1.4.1", - "bundled": true - }, - "wrappy": { - "version": "1.0.2", - "bundled": true - }, - "xmlbuilder": { - "version": "8.2.2", - "bundled": true - }, - "xmldom": { - "version": "0.1.27", - "bundled": true - } - } - }, "cordova-browser": { "version": "5.0.4", "resolved": "https://registry.npmjs.org/cordova-browser/-/cordova-browser-5.0.4.tgz", @@ -1331,7 +1121,7 @@ }, "pegjs": { "version": "0.10.0", - "resolved": "http://registry.npmjs.org/pegjs/-/pegjs-0.10.0.tgz", + "resolved": "https://registry.npmjs.org/pegjs/-/pegjs-0.10.0.tgz", "integrity": "sha1-z4uvrm7d/0tafvsYUmnqr0YQ3b0=" }, "portfinder": { diff --git a/cordova-app/package.json b/cordova-app/package.json index 54d5398..0841d1d 100644 --- a/cordova-app/package.json +++ b/cordova-app/package.json @@ -6,8 +6,7 @@ "cordova": { "platforms": [ "browser", - "ios", - "android" + "ios" ], "plugins": { "cordova-plugin-whitelist": {}, @@ -17,7 +16,6 @@ } }, "dependencies": { - "cordova-android": "^7.1.4", "cordova-browser": "^5.0.4", "cordova-ios": "^4.5.5", "cordova-plugin-camera": "^4.0.3", diff --git a/package.json b/package.json index 34c8d4e..054d53f 100755 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "plastic-patrol", "titile": "Plastic Patrol", - "version": "0.2.4", + "version": "2.0.1", "public": true, "homepage": "./", "dependencies": { @@ -31,6 +31,8 @@ "build:ios": "mkdir -p ./cordova-app/www/ && cp -a ./build/* ./cordova-app/www/ && cd cordova-app && cordova platform rm android && cordova platform rm ios && cordova platform add ios && cordova build --prod --release --device --buildConfig build.json && cd ..", "build:android": "mkdir -p ./cordova-app/www/ && cp -a ./build/* ./cordova-app/www/ && cd cordova-app && cordova platform rm android && cordova platform rm ios && cordova platform add android && cordova build --prod --release --buildConfig build.json && cd ..", "build:react": "./scripts/runWithVars.sh 'react-scripts build'", + "beta:android": "cd cordova-app; bundler exec fastlane android beta", + "beta:ios": "cd cordova-app; bundler exec fastlane ios beta", "coverage": "react-scripts test --env=jsdom --coverage", "coveralls": "cat ./coverage/lcov.info | node node_modules/.bin/coveralls", "geovation-photos-update": "geovation-photos-update",