Skip to content

Commit

Permalink
Merge branch 'develop' into 'master'
Browse files Browse the repository at this point in the history
Develop

See merge request papers/airgap/airgap-vault!285
  • Loading branch information
godenzim committed Oct 8, 2021
2 parents 6f9b276 + 373b0a6 commit c5c7a6f
Show file tree
Hide file tree
Showing 19 changed files with 12,364 additions and 41,691 deletions.
22 changes: 11 additions & 11 deletions .gitlab-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@ build_ionic:
unit:
stage: test
script:
- docker run --name unit-$CI_COMMIT_SHA $GOOGLE_TAG npm run test-ci
- docker run --name lint-$CI_COMMIT_SHA $GOOGLE_TAG npm run lint-ci
- docker run --name unit-$CI_COMMIT_SHA $GOOGLE_TAG yarn test-ci
- docker run --name lint-$CI_COMMIT_SHA $GOOGLE_TAG yarn lint-ci
- docker cp unit-$CI_COMMIT_SHA:/app/src/coverage/report-lcov/lcov.info lcov.info
- docker cp lint-$CI_COMMIT_SHA:/app/lintReport.json lintReport.json
after_script:
Expand Down Expand Up @@ -79,7 +79,7 @@ test_android:
qa:
stage: qa
script:
- docker create --name qa-$CI_PIPELINE_ID $GOOGLE_TAG npm run sonar-scanner -- -X
- docker create --name qa-$CI_PIPELINE_ID $GOOGLE_TAG yarn sonar-scanner -- -X
-Dsonar.typescript.lcov.reportPaths=lcov.info
-Dsonar.typescript.tslint.reportPaths=lintReport.json
-Dsonar.test.inclusions=**/*.spec.ts
Expand Down Expand Up @@ -108,13 +108,13 @@ build_ios:
script:
- export DEVELOPER_DIR=$XCODE_PATH
- nvm use 15
- npm install
- npm run disable-pure-getters
- npm run configure-mangle
- npm run apply-diagnostic-modules # manually remove unused cordova-diagnostic-plugin modules
- npx ionic info
- npx ionic build --prod
- npx cap sync ios
- yarn install --frozen-lockfile
- yarn disable-pure-getters
- yarn configure-mangle
- yarn apply-diagnostic-modules # manually remove unused cordova-diagnostic-plugin modules
- yarn ionic info
- yarn ionic build --prod
- yarn cap sync ios
- xcodebuild -workspace ios/App/App.xcworkspace -scheme "App" -destination generic/platform=iOS -configuration Release archive -archivePath ios/airgap-vault-$VERSION-$CI_PIPELINE_ID.xcarchive MARKETING_VERSION=$VERSION CURRENT_PROJECT_VERSION=$CI_PIPELINE_ID -allowProvisioningUpdates
artifacts:
paths:
Expand All @@ -130,6 +130,6 @@ publish_ios:
script:
- export DEVELOPER_DIR=$XCODE_PATH
- xcodebuild -exportArchive -archivePath ios/airgap-vault-$VERSION-$CI_PIPELINE_ID.xcarchive -exportOptionsPlist exportOptions.plist -exportPath ios/ -allowProvisioningUpdates
- xcrun altool --upload-app -f ios/App.ipa -u $IOS_USERNAME -p $IOS_PASSWORD
- xcrun altool --upload-app -f ios/App.ipa -t ios -u $IOS_USERNAME -p $IOS_PASSWORD
tags:
- ios
3 changes: 3 additions & 0 deletions .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
#!/bin/sh
. "$(dirname "$0")/_/husky.sh"
yarn pretty-quick --staged
15 changes: 7 additions & 8 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -25,18 +25,17 @@ WORKDIR /app
COPY install-build-deps.js /app
COPY install-test-deps.js /app
COPY package.json /app
COPY package-lock.json /app
COPY yarn.lock /app
COPY config /app/config
COPY apply-diagnostic-modules.js /app

RUN npm run install-test-dependencies
RUN yarn install-test-dependencies

# install dependencies
RUN npm install
RUN yarn install

# install static webserver
RUN npm install node-static -g

# browserify coin-lib
# RUN npm run browserify-coinlib
RUN yarn global add node-static

# Bundle app source
COPY . /app
Expand All @@ -48,6 +47,6 @@ RUN export NODE_ENV=production
RUN node config/patch_crypto.js

# build
RUN npx ionic build --prod
RUN yarn build:prod

CMD ["static", "-p", "8100", "-a", "0.0.0.0", "www"]
27 changes: 14 additions & 13 deletions build/android/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,28 +1,29 @@
FROM beevelop/ionic:v5.2.3
FROM beevelop/ionic:v2021.06.1

RUN apt-get update -y && apt-get install -y \
bzip2 \
build-essential \
pkg-config \
libjpeg-dev \
libcairo2-dev
libcairo2-dev

# create app directory
RUN mkdir /app
WORKDIR /app

# using npm 6.5.0 to fix installing certain cordova/ionic plugins
RUN npm install -g npm@7.7.6 ionic@5.4.0 @capacitor/core@2.4.0 @capacitor/cli@2.4.0
RUN npm cache clean -f
RUN npm install -g n
RUN yarn global add ionic@5.4.0 @capacitor/core@2.4.0 @capacitor/cli@2.4.0
RUN yarn cache clean --force
RUN yarn global add n
RUN n 15.14.0

# Install app dependencies, using wildcard if package-lock exists
COPY package.json /app/package.json
COPY package-lock.json /app/package-lock.json
COPY yarn.lock /app/yarn.lock
COPY config /app/config
COPY apply-diagnostic-modules.js /app

# install dependencies
RUN npm ci
RUN yarn install --frozen-lockfile

# copy capacitor configs and ionic configs
COPY capacitor.config.json /app/capacitor.config.json
Expand All @@ -44,16 +45,16 @@ ARG BUILD_NR
RUN sed -i -e "s/versionCode 1/versionCode $BUILD_NR/g" /app/android/app/build.gradle

# disable pure getters due to https://github.com/angular/angular-cli/issues/11439
RUN npm run disable-pure-getters
RUN yarn disable-pure-getters

# configure mangle (keep_fnames) for bitcoinjs https://github.com/bitcoinjs/bitcoinjs-lib/issues/959
RUN npm run configure-mangle
RUN yarn configure-mangle

# remove unused cordova-diagnostic-plugin features
RUN npm run apply-diagnostic-modules
RUN yarn apply-diagnostic-modules

# jetify dependencies
RUN npx jetifier
RUN yarn jetifier

# build ionic
RUN ionic build --prod
Expand All @@ -62,7 +63,7 @@ RUN ionic build --prod
RUN cap sync android

# accept licenses
RUN yes | $ANDROID_HOME/tools/bin/sdkmanager --update
RUN yes | /opt/android/tools/bin/sdkmanager --update

# clean project
RUN /app/android/gradlew --project-dir /app/android clean
Expand Down
Loading

0 comments on commit c5c7a6f

Please sign in to comment.