From 4e2c0c9bff7858b49e34a17e8988a772dbca541b Mon Sep 17 00:00:00 2001 From: stonebuzz Date: Thu, 31 Aug 2023 16:35:33 +0200 Subject: [PATCH] fix(build): Remove old CI workflow --- .circleci_old/README.md | 20 -- .circleci_old/config.yml | 241 ------------------------- ci/README.md | 51 ------ ci/gplay.json.enc | Bin 2400 -> 0 bytes ci/release.keystore | Bin 2243 -> 0 bytes ci/release.keystore.jks | Bin 2729 -> 0 bytes ci/scripts/app_certification.sh | 46 ----- ci/scripts/ci_licenses.sh | 29 --- ci/scripts/commit_version.sh | 38 ---- ci/scripts/create_about_data.sh | 83 --------- ci/scripts/create_documentation.sh | 83 --------- ci/scripts/deploy_alpha.sh | 51 ------ ci/scripts/deploy_production.sh | 53 ------ ci/scripts/generate_documentation.sh | 79 -------- ci/scripts/github_release.sh | 59 ------ ci/scripts/google_cloud.sh | 65 ------- ci/scripts/push_changes.sh | 50 ----- ci/scripts/push_screenshot.sh | 71 -------- ci/scripts/release.sh | 105 ----------- ci/scripts/setup_environment.sh | 85 --------- ci/scripts/transifex.sh | 52 ------ ci/scripts/validate_running.sh | 43 ----- fastlane_to_remove/Appfile | 2 - fastlane_to_remove/Fastfile | 50 ----- fastlane_to_remove/README.md | 26 --- fastlane_to_remove/Screengrabfile | 15 -- fastlane_to_remove/actions/sign_apk.rb | 94 ---------- fastlane_to_remove/actions/telegram.rb | 59 ------ fastlane_to_remove/actions/zipalign.rb | 58 ------ 29 files changed, 1608 deletions(-) delete mode 100644 .circleci_old/README.md delete mode 100644 .circleci_old/config.yml delete mode 100644 ci/README.md delete mode 100644 ci/gplay.json.enc delete mode 100644 ci/release.keystore delete mode 100644 ci/release.keystore.jks delete mode 100755 ci/scripts/app_certification.sh delete mode 100755 ci/scripts/ci_licenses.sh delete mode 100755 ci/scripts/commit_version.sh delete mode 100755 ci/scripts/create_about_data.sh delete mode 100755 ci/scripts/create_documentation.sh delete mode 100755 ci/scripts/deploy_alpha.sh delete mode 100755 ci/scripts/deploy_production.sh delete mode 100755 ci/scripts/generate_documentation.sh delete mode 100755 ci/scripts/github_release.sh delete mode 100755 ci/scripts/google_cloud.sh delete mode 100755 ci/scripts/push_changes.sh delete mode 100755 ci/scripts/push_screenshot.sh delete mode 100755 ci/scripts/release.sh delete mode 100755 ci/scripts/setup_environment.sh delete mode 100755 ci/scripts/transifex.sh delete mode 100755 ci/scripts/validate_running.sh delete mode 100644 fastlane_to_remove/Appfile delete mode 100644 fastlane_to_remove/Fastfile delete mode 100644 fastlane_to_remove/README.md delete mode 100644 fastlane_to_remove/Screengrabfile delete mode 100644 fastlane_to_remove/actions/sign_apk.rb delete mode 100644 fastlane_to_remove/actions/telegram.rb delete mode 100644 fastlane_to_remove/actions/zipalign.rb diff --git a/.circleci_old/README.md b/.circleci_old/README.md deleted file mode 100644 index 085393a84..000000000 --- a/.circleci_old/README.md +++ /dev/null @@ -1,20 +0,0 @@ -# Circleci configuration - -This is a circleci file configuration with version 2.0 with Android configuration and is created with a workflows to create a parallel runs for test and deploy task - -## Jobs - -A run is comprised of one or more named jobs. Jobs are specified in the jobs map, The name of the job is the key in the map, and the value is a map describing the job. - -## build - -Each job consists of the job’s name as a key and a map as a value. A title should be unique within a current jobs - -## steps - -A list of steps to be performed - -## More information - -- -- diff --git a/.circleci_old/config.yml b/.circleci_old/config.yml deleted file mode 100644 index 23746cdb5..000000000 --- a/.circleci_old/config.yml +++ /dev/null @@ -1,241 +0,0 @@ -version: 2 -reference: - - ## Workspaces - workspace: &workspace - ~/flyve_mdm - - ## Docker image configurations - android_config: &android_config - working_directory: *workspace - docker: - - image: circleci/android:api-29-node - environment: - TERM: dumb - _JAVA_OPTIONS: "-Xmx2048m -XX:+UnlockExperimentalVMOptions -XX:+UseContainerSupport" - GRADLE_OPTS: '-Dorg.gradle.jvmargs="-Xmx2048m"' - - ## Cache - gradle_key: &gradle_key - jars-v1-{{ checksum "gradle/wrapper/gradle-wrapper.properties" }}-{{ checksum "build.gradle" }}-{{ checksum "app/build.gradle" }} - - apk_certified_key: &apk_certified_key - apk-certified-v1-{{ .Environment.CIRCLE_WORKFLOW_ID }} - - restore_gradle_cache: &restore_gradle_cache - restore_cache: - key: *gradle_key - - restore_apk_certified_cache: &restore_apk_certified_cache - restore_cache: - key: *apk_certified_key - - save_gradle_cache: &save_gradle_cache - save_cache: - key: *gradle_key - paths: - - ~/.gradle - - ~/.m2 - - save_apk_certified_cache: &save_apk_certified_cache - save_cache: - key: *apk_certified_key - environment: - WORKSPACE: *workspace - paths: - - $WORKSPACE/app/build/outputs/apk/release/appCertified.apk - destination: - - $WORKSPACE/release/appCertified.apk - - ## Dependencies - ruby_dependencies: &ruby_dependencies - run: - name: Download Ruby Dependencies - command: bundle check || bundle install --path vendor/bundle - - android_dependencies: &android_dependencies - run: - name: Download Android Dependencies - command: ./gradlew androidDependencies - - validate_running: &validate_running - run: - name: Validate running - command: source ci/scripts/validate_running.sh - update_licenses: &update_licenses - run: - name: Update licenses - command: source ci/scripts/ci_licenses.sh -jobs: - # unit test - build: - <<: *android_config - steps: - - checkout - - *update_licenses - - *validate_running - - *restore_gradle_cache - - *ruby_dependencies - - *android_dependencies - - *save_gradle_cache - - run: - name: Run test - command: ./gradlew test - - # Test Instrumentation with Android 4.1 JELLY_BEAN API 16 - test_instrumentation: - <<: *android_config - steps: - - checkout - - *update_licenses - - *validate_running - - *restore_gradle_cache - - *ruby_dependencies - - *android_dependencies - - *save_gradle_cache - - run: - name: Create debug apk - command: ./gradlew assembleDebug assembleAndroidTest - - run: - name: Run Tests on Firebase test lab - command: source ci/scripts/google_cloud.sh - - check_transifex: - <<: *android_config - steps: - - checkout - - *update_licenses - - *validate_running - - *restore_gradle_cache - - *ruby_dependencies - - *android_dependencies - - *save_gradle_cache - - run: - name: Setup environment - command: source ci/scripts/setup_environment.sh - - run: - name: Pull transifex - command: tx pull --all --force - - run: - name: Create debug apk - command: ./gradlew assemble - - deploy_alpha: - <<: *android_config - steps: - - checkout - - *update_licenses - - *validate_running - - *restore_gradle_cache - - *ruby_dependencies - - *android_dependencies - - *save_gradle_cache - - *restore_apk_certified_cache - - run: - name: Setup environment - command: source ci/scripts/setup_environment.sh - - run: - name: Update version code - command: ./gradlew updateVersionCode - - run: - name: Generate certified apk - command: source ci/scripts/app_certification.sh - - run: - name: Deploy Alpha - command: source ci/scripts/deploy_alpha.sh - - deploy_production: - <<: *android_config - steps: - - checkout - - *update_licenses - - *validate_running - - *restore_gradle_cache - - *ruby_dependencies - - *android_dependencies - - *save_gradle_cache - - *restore_apk_certified_cache - - run: - name: Setup environment - command: source ci/scripts/setup_environment.sh - - run: - name: Update version code - command: ./gradlew updateVersionCode - - run: - name: Update version name - command: ./gradlew updateVersionName -P vName=$GIT_TAG - - run: - name: Generate certified apk - command: source ci/scripts/app_certification.sh - - run: - name: Deploy Production - command: source ci/scripts/deploy_production.sh - - run: - name: Create changelog, github release and push - command: source ci/scripts/release.sh - - #documentation: - # <<: *android_config - # steps: - # - checkout - # - *update_licenses - # - *validate_running - # - *restore_gradle_cache - # - *ruby_dependencies - # - *android_dependencies - # - *save_gradle_cache - # - run: - # name: Setup environment - # command: source ci/scripts/setup_environment.sh - # - run: - # name: Generate Documentation - # command: source ci/scripts/create_documentation.sh - -workflows: - version: 2 - build_test_and_deploy: - jobs: - - build: - context: org-global - - check_transifex: - context: org-global - requires: - - build - filters: - branches: - ignore: - - master - - develop - - test_instrumentation: - context: org-global - requires: - - build - filters: - branches: - ignore: - - master - - deploy_alpha: - context: org-global - requires: - - build - filters: - branches: - only: - - develop - - deploy_production: - context: org-global - requires: - - build - filters: - branches: - only: - - master - #- documentation: - # context: org-global - # requires: - # - build - # filters: - # branches: - # only: - # - master - # - develop \ No newline at end of file diff --git a/ci/README.md b/ci/README.md deleted file mode 100644 index daadc4033..000000000 --- a/ci/README.md +++ /dev/null @@ -1,51 +0,0 @@ -# Continuous Integration script and files - -Here is placed files and bash script required to build, test and deploy the app. - -## Files description - -- release.keystore is the key to certify the app to deploy, required by fastlane -- gplay.json.enc is the file with Google Play configuration, required by fastlane - -## Workflow description - -### On feature branch - -- run Build -- run Test Instrumentation - -### On develop - -- Run test instrumentations -- Send the Alpha version of the APK to the Palystore -- Create the code documentation and send it to gh-pages - -### On master - -- Send the LTS version to the Playstore -- Create the code documentation and send it to gh-pages - -## Environment variables - -On this project we use the following variables: - -- BUILD_TOOL -> Used to build the application, set to 26.0.0 -- $KEYSTORE -> Key store for apk signing -- $ALIAS -> The alias of the certificate to sign the apk -- $TELEGRAM_WEBHOOKS -> Used to send notifications to Telegram -- $THESTRALBOT_URL -> URL to Thestralbot -- $ENCRYPTED_KEY -> Used to desencrypt the key to sign the APK -- $GITHUB_EMAIL -> GitHub Email -- $GITHUB_USER -> GitHub User -- $GITHUB_TOKEN -> GitHub Token -- $TRANSIFEX_USER -> User of Transifex -- $TRANSIFEX_API_TOKEN -> API Token of Transifex - -## Libraries - -We use the following: - -- [conventional-github-releaser](https://github.com/conventional-changelog/releaser-tools) -- [gh-pages](https://github.com/tschaub/gh-pages) -- [node-github-releaser](https://github.com/miyajan/node-github-release) -- [standard-version](https://github.com/conventional-changelog/standard-version) \ No newline at end of file diff --git a/ci/gplay.json.enc b/ci/gplay.json.enc deleted file mode 100644 index f59dc3f330d9cc1d66583a25904a32d4ad9bb162..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 2400 zcmV-m37_^;VQh3|WM5y7zaB`-4!HOYJ_A(Uvt1%>Kb>f0lk+Ysx@-a~Q`QJgMCrJ3 z{3xCnJ26sY+F8mB-|7#Cpb8=3|0VCf4Sb{b`o(MTpcGWt@w_(i5i6jOn>VWaP?c1- z*zVavZ!fx{SeTvLcV_5+khQH*n7U030JGSqW>Lb%s(iEh1AjaJ z0>{%~N?4>Gb7!P_1~7AxcGPxa+q71ppjlU7Z)akQyM}4CqL31hg0_9FNQTaBwC@_n zYrs-)ssyq)Gs;clG%zApZXmb~5k3w5ZmLusYeHC3D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(z|_Mmn~^&b+StZhwuFO{UBoOG%sD&>Rl)m2V1CRM#d8f5_j_IkvdckTrE`C2N2(88>WN*uUQl zg#i$tNCFfGMUUnv$_+mO=kH|ng(Zj~wGL8vNg8mwbBg=&U;ioM(Iy><2tb1M3N2_) zwpbh0c5Ap=(u)0KKPC|3T6(G^UJs}*cXAn$5Y|M(-n6EEaZvJ-GSNMx`L>324&uB4 z=++uzUp`KifpyQtf;-s0G*-8l2z4mNx^mBSR0$EPTc>~g73e!x#G z?`~dODvY-jAH?ESOWj&|i_F71H}(C~`*~O@pE3T;D=u}v>KXMLe>C^EC&ZwLeal!) z^cB)3=zsN#q}Hg7v?N;fAR8aSGpjMCwxvFy+WZ(-rS{@Vs8rgWz16U#_R%G}wF}7# zFqK)Qp>@yjra{ZQ%Xz%5&Vo0NO~ni9pfV96UamjV@;5h*>9jbX`}x+49;ZQ5ZgwA? OYpl3i<@^k`7Vrlt2HG?L diff --git a/ci/release.keystore.jks b/ci/release.keystore.jks deleted file mode 100644 index f21cc204a0a370185fbea8af5a95e6463019265b..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 2729 zcma)6X*d*&7M|5kNMr^dAq+CK7)y4>zAsILh{%?~*fZv1h-~@n%GiZcRAftIjIuA; z%9gPdQeiZqaXrty&-Xp|*S$Z^InVpP=RH5pj~7Ycs00DQNCJl|3p;{nO#I0WWCfB4 z999qlhuJZWMiQW%|0O{iAOvXLF^8Iknd4*hn2-8(+(?Z@0JM(?Zfy|9@zaPMxvcKbg5 zCmtCQ`H1mz5MFd?*1Y3FRpOvF51jUh{b?XZJfRC-K~a&_`*iffYG8VPSlij%&2PVB zCVqXbZFI=qde#wRh9g%dq#K^}E6|6(P&LjeQCJ8Y-3fZAS1_nwY^>7OSKBH@%J=$SN0f?qb z0rQCD~wxRzVw|HmJtuyi7da6;Wm7kobI)UF34R#A2M7{>ptE#Px%$ld5Nj{)pmvp*>5CFEv<5_;*sjbDn%#D zOXW5WoB^brDiK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X-kM&*-%;-+&B$B7%=(tA2$8@f08aY zc2jI3&Z;*(8!%FpyOukLm;kv+E zN*-?%O)k`}6t*mk-uuLx@th(wheoGA>Wh-Q%PTTvk7}Wg?ZAUWgmG#Lc8uai;rQF} z<=(G$rAwH)iW2MLmP_u!i;xFAv(7oq8NUA0V%)05lz|i2?XWuRWfy-k5Rz**t)s;g z-6VIezwotyBS8LhZ0jlCX{xwFyiU3TVoJy%--QZ*j2XThz5(wlU%O)YCpO+2z6iN|dr)f)H;qM#A1Du9;=f5}@GzR1%KX1)yC&aET z{IO9^+V3Y`%uWb09UqY5dCS&Wxhz^ytC_Z`f3Ui(r%%DR9J0&RD1`)K78L`9as*Bf(A-TJ{9Qhr12=HLBJnAu25D)O5RJNO$(HNU$rT?;Gv{+AyEQ6g zt|rK!V+DE62RnsMP7Cm*AZ%N^WVNgoxd~0-9A-|3M@kVGTyWdO?)i+8FEs(%3TaQy znK&JPYJCBD!B;TRvTkGZY$R&pBeApp#g4SEP}4?v7v_sz1@DG@6B3g*MwxSC`<=OJ z7Jzb6iDF&*+$?6<-k4+@{eJq(!6|#g=@PbzE7d}Rv7HW5?fo)|ORH~ELuSE9Eu;jJ zodqh-0|vpM0Ej^FNhMFG3-Fj&%R@$-$!%ty9l;tRkc)w*4h!8JGA(&Od)UN&&cMiJ K9s~vwN&f=fs_f ./app/src/main/assets/about.properties -echo "about.build=$VERSION_CODE" >> ./app/src/main/assets/about.properties -echo "about.date=$(date "+%a %b %d %H:%M:%S %Y")" >> ./app/src/main/assets/about.properties -echo "about.commit=${CIRCLE_SHA1:0:7}" >> ./app/src/main/assets/about.properties -echo "about.commitFull=$CIRCLE_SHA1" >> ./app/src/main/assets/about.properties -echo "about.github=https://github.com/glpi-project/android-inventory-agent" >> ./app/src/main/assets/about.properties \ No newline at end of file diff --git a/ci/scripts/create_documentation.sh b/ci/scripts/create_documentation.sh deleted file mode 100755 index dd13988ed..000000000 --- a/ci/scripts/create_documentation.sh +++ /dev/null @@ -1,83 +0,0 @@ -#!/usr/bin/env bash -# -# --------------------------------------------------------------------- -# GLPI Android Inventory Agent -# Copyright (C) 2019 Teclib. -# -# https://glpi-project.org -# -# Based on Flyve MDM Inventory Agent For Android -# Copyright © 2018 Teclib. All rights reserved. -# -# --------------------------------------------------------------------- -# -# LICENSE -# -# This file is part of GLPI Android Inventory Agent. -# -# GLPI Android Inventory Agent is a subproject of GLPI. -# -# GLPI Android Inventory Agent is free software: you can redistribute it and/or -# modify it under the terms of the GNU General Public License -# as published by the Free Software Foundation; either version 3 -# of the License, or (at your option) any later version. -# -# GLPI Android Inventory Agent is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# --------------------------------------------------------------------- -# @copyright Copyright © 2019 Teclib. All rights reserved. -# @license GPLv3 https://www.gnu.org/licenses/gpl-3.0.html -# @link https://github.com/glpi-project/android-inventory-agent -# @link https://glpi-project.org/glpi-network/ -# --------------------------------------------------------------------- -# - -GH_COMMIT_MESSAGE=$(git log --pretty=oneline -n 1 $CIRCLE_SHA1) - -# validate commit message to avoid repeated builds and loops -if [[ $GH_COMMIT_MESSAGE != *"ci(release): generate CHANGELOG.md for version"* && $GH_COMMIT_MESSAGE != *"build(properties): add new properties values"* && $GH_COMMIT_MESSAGE != *"ci(release): update version on android manifest"* ]]; then - -# run generate documentation script -./ci/scripts/generate_documentation.sh - -# Update layouts and styles of development folder for correct display on project site - -# checkout uncommited changes -git checkout -- Gemfile.lock - -# get gh-pages branch -git fetch origin gh-pages - -# move to gh-pages -git checkout gh-pages - -# clean workspace -sudo git clean -fdx - -# remove default stylesheet.css -sudo rm ./development/code-documentation/"$CIRCLE_BRANCH"/stylesheet.css -# sudo rm ./development/coverage/resources/report.css -# sudo rm ./development/test-reports/css/base-style.css -# sudo rm ./development/test-reports/css/style.css - -# add new css -cp ./css/codeDocumentation.css ./development/code-documentation/"$CIRCLE_BRANCH"/stylesheet.css -# cp ./css/coverage.css ./development/coverage/resources/report.css -# cp ./css/testReports.css ./development/test-reports/css/style.css -# touch ./development/test-reports/css/base-style.css - -# change headers -ruby ci/add_header.rb - -# add and commit changes -git add . && git commit -m "docs(development): update headers and css styles" - -# push to branch -git push origin gh-pages - -# go back to original branch -git checkout $CIRCLE_BRANCH - -fi \ No newline at end of file diff --git a/ci/scripts/deploy_alpha.sh b/ci/scripts/deploy_alpha.sh deleted file mode 100755 index 950e300ed..000000000 --- a/ci/scripts/deploy_alpha.sh +++ /dev/null @@ -1,51 +0,0 @@ -#!/usr/bin/env bash -# -# --------------------------------------------------------------------- -# GLPI Android Inventory Agent -# Copyright (C) 2019 Teclib. -# -# https://glpi-project.org -# -# Based on Flyve MDM Inventory Agent For Android -# Copyright © 2018 Teclib. All rights reserved. -# -# --------------------------------------------------------------------- -# -# LICENSE -# -# This file is part of GLPI Android Inventory Agent. -# -# GLPI Android Inventory Agent is a subproject of GLPI. -# -# GLPI Android Inventory Agent is free software: you can redistribute it and/or -# modify it under the terms of the GNU General Public License -# as published by the Free Software Foundation; either version 3 -# of the License, or (at your option) any later version. -# -# GLPI Android Inventory Agent is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# --------------------------------------------------------------------- -# @copyright Copyright © 2019 Teclib. All rights reserved. -# @license GPLv3 https://www.gnu.org/licenses/gpl-3.0.html -# @link https://github.com/glpi-project/android-inventory-agent -# @link https://glpi-project.org/glpi-network/ -# --------------------------------------------------------------------- -# - -GH_COMMIT_MESSAGE=$(git log --pretty=oneline -n 1 $CIRCLE_SHA1) - -# validate commit message to avoid repeated builds and loops -if [[ $GH_COMMIT_MESSAGE != *"ci(release): generate CHANGELOG.md for version"* && $GH_COMMIT_MESSAGE != *"build(properties): add new properties values"* && $GH_COMMIT_MESSAGE != *"ci(release): update version on android manifest"* ]]; then - - # update manifest changes - git add app/src/main/AndroidManifest.xml - git add app/src/main/assets/about.properties - git commit -m "ci(release): update version on android manifest" - git checkout . -f - git push origin develop - - sudo fastlane android "alpha" - -fi \ No newline at end of file diff --git a/ci/scripts/deploy_production.sh b/ci/scripts/deploy_production.sh deleted file mode 100755 index 270831e88..000000000 --- a/ci/scripts/deploy_production.sh +++ /dev/null @@ -1,53 +0,0 @@ -#!/usr/bin/env bash -# -# --------------------------------------------------------------------- -# GLPI Android Inventory Agent -# Copyright (C) 2019 Teclib. -# -# https://glpi-project.org -# -# Based on Flyve MDM Inventory Agent For Android -# Copyright © 2018 Teclib. All rights reserved. -# -# --------------------------------------------------------------------- -# -# LICENSE -# -# This file is part of GLPI Android Inventory Agent. -# -# GLPI Android Inventory Agent is a subproject of GLPI. -# -# GLPI Android Inventory Agent is free software: you can redistribute it and/or -# modify it under the terms of the GNU General Public License -# as published by the Free Software Foundation; either version 3 -# of the License, or (at your option) any later version. -# -# GLPI Android Inventory Agent is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# --------------------------------------------------------------------- -# @copyright Copyright © 2019 Teclib. All rights reserved. -# @license GPLv3 https://www.gnu.org/licenses/gpl-3.0.html -# @link https://github.com/glpi-project/android-inventory-agent -# @link https://glpi-project.org/glpi-network/ -# --------------------------------------------------------------------- -# - -GH_COMMIT_MESSAGE=$(git log --pretty=oneline -n 1 $CIRCLE_SHA1) - -# validate commit message to avoid repeated builds and loops -if [[ $GH_COMMIT_MESSAGE != *"ci(release): generate CHANGELOG.md for version"* && $GH_COMMIT_MESSAGE != *"build(properties): add new properties values"* && $GH_COMMIT_MESSAGE != *"ci(release): update version on android manifest"* ]]; then - - # Get the version number from package.json - export GIT_TAG=$(jq -r ".version" package.json) - # get if is a release or a pre release with "-" - IS_PRERELEASE="$( cut -d '-' -f 2 <<< "$GIT_TAG" )"; - - if [[ $GIT_TAG != "$IS_PRERELEASE" ]]; then - fastlane android "playstore" - else - fastlane android "beta" - fi - -fi \ No newline at end of file diff --git a/ci/scripts/generate_documentation.sh b/ci/scripts/generate_documentation.sh deleted file mode 100755 index 4f3526159..000000000 --- a/ci/scripts/generate_documentation.sh +++ /dev/null @@ -1,79 +0,0 @@ -#!/usr/bin/env bash -# -# --------------------------------------------------------------------- -# GLPI Android Inventory Agent -# Copyright (C) 2019 Teclib. -# -# https://glpi-project.org -# -# Based on Flyve MDM Inventory Agent For Android -# Copyright © 2018 Teclib. All rights reserved. -# -# --------------------------------------------------------------------- -# -# LICENSE -# -# This file is part of GLPI Android Inventory Agent. -# -# GLPI Android Inventory Agent is a subproject of GLPI. -# -# GLPI Android Inventory Agent is free software: you can redistribute it and/or -# modify it under the terms of the GNU General Public License -# as published by the Free Software Foundation; either version 3 -# of the License, or (at your option) any later version. -# -# GLPI Android Inventory Agent is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# --------------------------------------------------------------------- -# @copyright Copyright © 2019 Teclib. All rights reserved. -# @license GPLv3 https://www.gnu.org/licenses/gpl-3.0.html -# @link https://github.com/glpi-project/android-inventory-agent -# @link https://glpi-project.org/glpi-network/ -# --------------------------------------------------------------------- -# - -# # create code coverage report -# ./gradlew createDebugCoverageReport -# -# # move code coverage -# mv -v app/build/reports/coverage development -# -# # move Android test -# mv -v app/build/reports/androidTests development -# -# # rename folders to match respective section on project site -# mv development/debug development/coverage -# mv development/androidTests/connected development/test-reports -# -# # replace .resources with resource because github doesn't support folders with "_" or "." at the beginning -# mv development/coverage/.resources development/coverage/resources -# -# # find and replace links to the old name of file -# grep -rl .resources development/coverage/ | xargs sed -i 's|.resources|resources|g' -# -# # replace .sessions -# mv development/coverage/.sessions.html development/coverage/sessions.html -# -# # find and replace links to the old name of file -# grep -rl .sessions.html development/coverage/ | xargs sed -i 's|.sessions.html|sessions.html|g' - -DOC_PATH="development/code-documentation/$CIRCLE_BRANCH" - -# Generate javadoc this folder must be on .gitignore -#javadoc -d $DOC_PATH -sourcepath ./inventory/src/main/java -subpackages . -bootclasspath $ANDROID_HOME/platforms/android-29/android.jar - -./gradlew :app:javadoc -PcustomDestination=$DOC_PATH - -# delete the index.html file -sudo rm $DOC_PATH/index.html - -# rename the overview-summary.html file to index.html -mv $DOC_PATH/overview-summary.html $DOC_PATH/index.html - -# find and replace links to the old name of file -grep -rl overview-summary.html $DOC_PATH | xargs sed -i 's|overview-summary.html|index.html|g' - -# send development folder to project site with the documentation updated, also removes the folder with old docs -yarn gh-pages --dist $DOC_PATH --dest $DOC_PATH -m "docs(development): update code documentation" \ No newline at end of file diff --git a/ci/scripts/github_release.sh b/ci/scripts/github_release.sh deleted file mode 100755 index df9b58179..000000000 --- a/ci/scripts/github_release.sh +++ /dev/null @@ -1,59 +0,0 @@ -#!/usr/bin/env bash -# -# --------------------------------------------------------------------- -# GLPI Android Inventory Agent -# Copyright (C) 2019 Teclib. -# -# https://glpi-project.org -# -# Based on Flyve MDM Inventory Agent For Android -# Copyright © 2018 Teclib. All rights reserved. -# -# --------------------------------------------------------------------- -# -# LICENSE -# -# This file is part of GLPI Android Inventory Agent. -# -# GLPI Android Inventory Agent is a subproject of GLPI. -# -# GLPI Android Inventory Agent is free software: you can redistribute it and/or -# modify it under the terms of the GNU General Public License -# as published by the Free Software Foundation; either version 3 -# of the License, or (at your option) any later version. -# -# GLPI Android Inventory Agent is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# --------------------------------------------------------------------- -# @copyright Copyright © 2019 Teclib. All rights reserved. -# @license GPLv3 https://www.gnu.org/licenses/gpl-3.0.html -# @link https://github.com/glpi-project/android-inventory-agent -# @link https://glpi-project.org/glpi-network/ -# --------------------------------------------------------------------- -# - -# push tag to github -yarn conventional-github-releaser -t $GH_TOKEN 2> /dev/null || true - -# get tag number -GIT_TAG=$(jq -r ".version" package.json) - -# get apk path -FILE=$(find ./app/build/outputs/apk/release -name '*.apk' | head -1) - -# Update release name -yarn github-release edit \ ---user $CIRCLE_PROJECT_USERNAME \ ---repo $CIRCLE_PROJECT_REPONAME \ ---tag ${GIT_TAG} \ ---name "Inventory Agent v${GIT_TAG}" \ - -# Upload example code release -# yarn github-release upload \ -# --user $CIRCLE_PROJECT_USERNAME \ -# --repo $CIRCLE_PROJECT_REPONAME \ -# --tag ${GIT_TAG} \ -# --name "InventoryAgent-${GIT_TAG}.apk" \ -# --file ${FILE} \ No newline at end of file diff --git a/ci/scripts/google_cloud.sh b/ci/scripts/google_cloud.sh deleted file mode 100755 index 37adb2bf3..000000000 --- a/ci/scripts/google_cloud.sh +++ /dev/null @@ -1,65 +0,0 @@ -#!/usr/bin/env bash -# -# --------------------------------------------------------------------- -# GLPI Android Inventory Agent -# Copyright (C) 2019 Teclib. -# -# https://glpi-project.org -# -# Based on Flyve MDM Inventory Agent For Android -# Copyright © 2018 Teclib. All rights reserved. -# -# --------------------------------------------------------------------- -# -# LICENSE -# -# This file is part of GLPI Android Inventory Agent. -# -# GLPI Android Inventory Agent is a subproject of GLPI. -# -# GLPI Android Inventory Agent is free software: you can redistribute it and/or -# modify it under the terms of the GNU General Public License -# as published by the Free Software Foundation; either version 3 -# of the License, or (at your option) any later version. -# -# GLPI Android Inventory Agent is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# --------------------------------------------------------------------- -# @copyright Copyright © 2019 Teclib. All rights reserved. -# @license GPLv3 https://www.gnu.org/licenses/gpl-3.0.html -# @link https://github.com/glpi-project/android-inventory-agent -# @link https://glpi-project.org/glpi-network/ -# --------------------------------------------------------------------- -# - -# Since we will download a video, we require integrity checking with CRC32c -# But the crcmod installation in the docker image isn't using the module's C extension -# So, uninstall it and install again with the C extension - -if [[ $GH_COMMIT_MESSAGE != *"ci(release): generate CHANGELOG.md for version"* && $GH_COMMIT_MESSAGE != *"build(properties): add new properties values"* && $GH_COMMIT_MESSAGE != *"ci(release): update version on android manifest"* ]]; then - - -echo "y" | sudo pip uninstall crcmod - -sudo pip install -U crcmod - -# create json key file -echo $GCLOUD_SERVICE_KEY | base64 --decode --ignore-garbage > ${HOME}/gcloud-service-key.json - -# activate the account -gcloud auth activate-service-account --key-file ${HOME}/gcloud-service-key.json - -# config the project -gcloud config set project ${GCLOUD_PROJECT} - -# Run Instrumented test -gcloud firebase test android run \ - --type instrumentation \ - --app $(ls -dt ~/flyve_mdm/app/build/outputs/apk/debug/*.apk | head -1) \ - --test $(ls -dt ~/flyve_mdm/app/build/outputs/apk/androidTest/debug/*.apk | head -1) \ - --device model=Nexus6,version=25,locale=en,orientation=portrait \ - --timeout 180s - -fi \ No newline at end of file diff --git a/ci/scripts/push_changes.sh b/ci/scripts/push_changes.sh deleted file mode 100755 index f1bbc875f..000000000 --- a/ci/scripts/push_changes.sh +++ /dev/null @@ -1,50 +0,0 @@ -#!/usr/bin/env bash -# -# --------------------------------------------------------------------- -# GLPI Android Inventory Agent -# Copyright (C) 2019 Teclib. -# -# https://glpi-project.org -# -# Based on Flyve MDM Inventory Agent For Android -# Copyright © 2018 Teclib. All rights reserved. -# -# --------------------------------------------------------------------- -# -# LICENSE -# -# This file is part of GLPI Android Inventory Agent. -# -# GLPI Android Inventory Agent is a subproject of GLPI. -# -# GLPI Android Inventory Agent is free software: you can redistribute it and/or -# modify it under the terms of the GNU General Public License -# as published by the Free Software Foundation; either version 3 -# of the License, or (at your option) any later version. -# -# GLPI Android Inventory Agent is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# --------------------------------------------------------------------- -# @copyright Copyright © 2019 Teclib. All rights reserved. -# @license GPLv3 https://www.gnu.org/licenses/gpl-3.0.html -# @link https://github.com/glpi-project/android-inventory-agent -# @link https://glpi-project.org/glpi-network/ -# --------------------------------------------------------------------- -# - -# Push commits and tags to origin branch -git push --follow-tags origin $CIRCLE_BRANCH - -# go to develop -git checkout develop - -# rebase with master -git merge master - -# push develop -git push origin develop --force - -# return to master -git checkout master \ No newline at end of file diff --git a/ci/scripts/push_screenshot.sh b/ci/scripts/push_screenshot.sh deleted file mode 100755 index 43f91a61d..000000000 --- a/ci/scripts/push_screenshot.sh +++ /dev/null @@ -1,71 +0,0 @@ -#!/usr/bin/env bash -# -# --------------------------------------------------------------------- -# GLPI Android Inventory Agent -# Copyright (C) 2019 Teclib. -# -# https://glpi-project.org -# -# Based on Flyve MDM Inventory Agent For Android -# Copyright © 2018 Teclib. All rights reserved. -# -# --------------------------------------------------------------------- -# -# LICENSE -# -# This file is part of GLPI Android Inventory Agent. -# -# GLPI Android Inventory Agent is a subproject of GLPI. -# -# GLPI Android Inventory Agent is free software: you can redistribute it and/or -# modify it under the terms of the GNU General Public License -# as published by the Free Software Foundation; either version 3 -# of the License, or (at your option) any later version. -# -# GLPI Android Inventory Agent is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# --------------------------------------------------------------------- -# @copyright Copyright © 2019 Teclib. All rights reserved. -# @license GPLv3 https://www.gnu.org/licenses/gpl-3.0.html -# @link https://github.com/glpi-project/android-inventory-agent -# @link https://glpi-project.org/glpi-network/ -# --------------------------------------------------------------------- -# - -# Push commits and tags to origin branch -sudo mv ./fastlane/metadata/android ./screenshots -sudo mv ./screenshots/screenshots.html ./screenshots/index.html - -# send to gh-pages, also removes folder with old docs -yarn gh-pages --dist ./screenshots/ --dest ./screenshots/ -m "ci(screenshot): update screenshot" - -# Update headers for correct display on project site - -# checkout uncommited changes -git checkout -- app/src/main/assets/setup.properties - -# fetch -git fetch origin gh-pages - -# move to branch -git checkout gh-pages - -# clean workspace -sudo git clean -fdx - -# add header -ruby ./ci/add_header_screenshot.rb - -# add -git add ./screenshots - -# commit headers change -git commit -m "ci(screenshots): add headers" - -# push to branch -git push origin gh-pages - -# got back to original branch -git checkout $CIRCLE_BRANCH \ No newline at end of file diff --git a/ci/scripts/release.sh b/ci/scripts/release.sh deleted file mode 100755 index fcf77f2c4..000000000 --- a/ci/scripts/release.sh +++ /dev/null @@ -1,105 +0,0 @@ -#!/usr/bin/env bash -# -# --------------------------------------------------------------------- -# GLPI Android Inventory Agent -# Copyright (C) 2019 Teclib. -# -# https://glpi-project.org -# -# Based on Flyve MDM Inventory Agent For Android -# Copyright © 2018 Teclib. All rights reserved. -# -# --------------------------------------------------------------------- -# -# LICENSE -# -# This file is part of GLPI Android Inventory Agent. -# -# GLPI Android Inventory Agent is a subproject of GLPI. -# -# GLPI Android Inventory Agent is free software: you can redistribute it and/or -# modify it under the terms of the GNU General Public License -# as published by the Free Software Foundation; either version 3 -# of the License, or (at your option) any later version. -# -# GLPI Android Inventory Agent is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# --------------------------------------------------------------------- -# @copyright Copyright © 2019 Teclib. All rights reserved. -# @license GPLv3 https://www.gnu.org/licenses/gpl-3.0.html -# @link https://github.com/glpi-project/android-inventory-agent -# @link https://glpi-project.org/glpi-network/ -# --------------------------------------------------------------------- -# - -# Get version number from package.json -export GIT_TAG=$(jq -r ".version" package.json) -export GITHUB_TOKEN=$GH_TOKEN - -# Generate CHANGELOG.md and increment version -IS_PRERELEASE="$( cut -d '-' -f 2 <<< "$GIT_TAG" )"; - -# update manifest changes -git add app/src/main/AndroidManifest.xml -git commit -m "build(manifest): increase version value" - -#if [[ $CIRCLE_BRANCH != "$IS_PRERELEASE" ]]; then -# -# PREFIX_PRERELEASE="$( cut -d '.' -f 1 <<< "$IS_PRERELEASE" )"; -# yarn release --skip.bump=true -m "ci(release): generate CHANGELOG.md for version %s" --prerelease "$PREFIX_PRERELEASE" -# -#else - -# create CHANGELOG and update the number on package.json -yarn release --skip.bump=true -m "ci(release): generate CHANGELOG.md for version %s" - -#fi - -# send changelog to gh-pages -#yarn gh-pages --dist ./ --src CHANGELOG.md --dest ./_includes/ --add -m "docs(changelog): update changelog with version ${GIT_TAG}" - -# remove from stash -git checkout app/src/main/assets/about.properties - -# remove others files -git checkout . -f - -# Push commits and tags to origin branch -git push --follow-tags origin $CIRCLE_BRANCH - -# Create release with conventional-github-releaser -yarn conventional-github-releaser -p angular -t $GH_TOKEN 2> /dev/null || true - -# get apk path -# export FILE="./app/build/outputs/apk/release/appCertified.apk" - -#if [[ $CIRCLE_BRANCH != "$IS_PRERELEASE" ]]; then - - # Upload release -# yarn github-release upload \ -# --user "${CIRCLE_PROJECT_USERNAME}" \ -# --repo "${CIRCLE_PROJECT_REPONAME}" \ -# --tag "${GIT_TAG}" \ -# --name "InventoryAgent-${GIT_TAG}.apk" - -# else - - # Upload pre-release -# yarn github-release upload \ -# --user "${CIRCLE_PROJECT_USERNAME}" \ -# --repo "${CIRCLE_PROJECT_REPONAME}" \ -# --tag "${GIT_TAG}" \ -# --name "InventoryAgent-${GIT_TAG}.apk" \ -# --pre-release - -# fi - -# Update develop branch -git add . -git stash -git fetch origin develop -git checkout develop -git merge $CIRCLE_BRANCH -git push origin develop --force \ No newline at end of file diff --git a/ci/scripts/setup_environment.sh b/ci/scripts/setup_environment.sh deleted file mode 100755 index 810a1aae5..000000000 --- a/ci/scripts/setup_environment.sh +++ /dev/null @@ -1,85 +0,0 @@ -#!/usr/bin/env bash -# -# --------------------------------------------------------------------- -# GLPI Android Inventory Agent -# Copyright (C) 2019 Teclib. -# -# https://glpi-project.org -# -# Based on Flyve MDM Inventory Agent For Android -# Copyright © 2018 Teclib. All rights reserved. -# -# --------------------------------------------------------------------- -# -# LICENSE -# -# This file is part of GLPI Android Inventory Agent. -# -# GLPI Android Inventory Agent is a subproject of GLPI. -# -# GLPI Android Inventory Agent is free software: you can redistribute it and/or -# modify it under the terms of the GNU General Public License -# as published by the Free Software Foundation; either version 3 -# of the License, or (at your option) any later version. -# -# GLPI Android Inventory Agent is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# --------------------------------------------------------------------- -# @copyright Copyright © 2019 Teclib. All rights reserved. -# @license GPLv3 https://www.gnu.org/licenses/gpl-3.0.html -# @link https://github.com/glpi-project/android-inventory-agent -# @link https://glpi-project.org/glpi-network/ -# --------------------------------------------------------------------- -# - -# create environment vars to work with fastlane telegram -echo GIT_REPO=$CIRCLE_REPOSITORY_URL >> .env -echo GIT_BRANCH=$CIRCLE_BRANCH >> .env - -# decrypt deploy on google play file -openssl aes-256-cbc -d -out ci/gplay.json -in ci/gplay.json.enc -k $ENCRYPTED_KEY - -# Maintenance commands -sudo apt-get update - -# install gems -sudo apt-get install ruby-full build-essential - -# update Rubygems -sudo gem update --system --no-document - -# install rake -sudo gem install rake - -# install fastlane -sudo gem install fastlane --no-document - -# update bundler -sudo gem install bundler --no-document - -# update Gemfile.lock -sudo bundler update --bundler - -# install node package available on package.json -yarn install - -# config git -git config --global user.email $GH_EMAIL -git config --global user.name "Teclib" - -git remote remove origin -git remote add origin https://$GH_USER:$GH_TOKEN@github.com/$CIRCLE_PROJECT_USERNAME/$CIRCLE_PROJECT_REPONAME.git - -# Get version number from package.json -export GIT_TAG=$(jq -r ".version" package.json) - -# remove python2 python3 -sudo apt -y purge python2.7 -sudo apt-get -y install python3-pip - -# install transifex CLI -sudo pip3 install --upgrade requests urllib3 botocore awscli awsebcli -sudo pip3 install transifex-client -sudo echo $'[https://www.transifex.com]\nhostname = https://www.transifex.com\nusername = '"$TRANSIFEX_USER"$'\npassword = '"$TRANSIFEX_TOKEN"$'\ntoken = '"$TRANSIFEX_TOKEN"$'\n' > ~/.transifexrc diff --git a/ci/scripts/transifex.sh b/ci/scripts/transifex.sh deleted file mode 100755 index 1724bb880..000000000 --- a/ci/scripts/transifex.sh +++ /dev/null @@ -1,52 +0,0 @@ -#!/usr/bin/env bash -# -# --------------------------------------------------------------------- -# GLPI Android Inventory Agent -# Copyright (C) 2019 Teclib. -# -# https://glpi-project.org -# -# Based on Flyve MDM Inventory Agent For Android -# Copyright © 2018 Teclib. All rights reserved. -# -# --------------------------------------------------------------------- -# -# LICENSE -# -# This file is part of GLPI Android Inventory Agent. -# -# GLPI Android Inventory Agent is a subproject of GLPI. -# -# GLPI Android Inventory Agent is free software: you can redistribute it and/or -# modify it under the terms of the GNU General Public License -# as published by the Free Software Foundation; either version 3 -# of the License, or (at your option) any later version. -# -# GLPI Android Inventory Agent is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# --------------------------------------------------------------------- -# @copyright Copyright © 2019 Teclib. All rights reserved. -# @license GPLv3 https://www.gnu.org/licenses/gpl-3.0.html -# @link https://github.com/glpi-project/android-inventory-agent -# @link https://glpi-project.org/glpi-network/ -# --------------------------------------------------------------------- -# - -# get transifex status -tx status - -# push local files to transifex -tx push --source --no-interactive - -# pull all the new language with 80% complete -tx pull --all --force - -# # add all changes -# git add . -# -# # commit this changes -# git commit -m "ci(transifex): update locales files" -# -# git push origin $CIRCLE_BRANCH \ No newline at end of file diff --git a/ci/scripts/validate_running.sh b/ci/scripts/validate_running.sh deleted file mode 100755 index 5fb2879dd..000000000 --- a/ci/scripts/validate_running.sh +++ /dev/null @@ -1,43 +0,0 @@ -#!/usr/bin/env bash -# -# --------------------------------------------------------------------- -# GLPI Android Inventory Agent -# Copyright (C) 2019 Teclib. -# -# https://glpi-project.org -# -# Based on Flyve MDM Inventory Agent For Android -# Copyright © 2018 Teclib. All rights reserved. -# -# --------------------------------------------------------------------- -# -# LICENSE -# -# This file is part of GLPI Android Inventory Agent. -# -# GLPI Android Inventory Agent is a subproject of GLPI. -# -# GLPI Android Inventory Agent is free software: you can redistribute it and/or -# modify it under the terms of the GNU General Public License -# as published by the Free Software Foundation; either version 3 -# of the License, or (at your option) any later version. -# -# GLPI Android Inventory Agent is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# --------------------------------------------------------------------- -# @copyright Copyright © 2019 Teclib. All rights reserved. -# @license GPLv3 https://www.gnu.org/licenses/gpl-3.0.html -# @link https://github.com/glpi-project/android-inventory-agent -# @link https://glpi-project.org/glpi-network/ -# --------------------------------------------------------------------- -# - -GH_COMMIT_MESSAGE=$(git log --pretty=oneline -n 1 $CIRCLE_SHA1) -echo $GH_COMMIT_MESSAGE - -if [[ $GH_COMMIT_MESSAGE = *"build(manifest): increase version value"* ]]; then - echo "Invalid running" - exit 1 -fi \ No newline at end of file diff --git a/fastlane_to_remove/Appfile b/fastlane_to_remove/Appfile deleted file mode 100644 index 2024f6c9d..000000000 --- a/fastlane_to_remove/Appfile +++ /dev/null @@ -1,2 +0,0 @@ -json_key_file "ci/gplay.json" # Path to the json secret file - Follow https://github.com/fastlane/supply#setup to get one -package_name "org.glpi.inventory.agent" # e.g. com.krausefx.app diff --git a/fastlane_to_remove/Fastfile b/fastlane_to_remove/Fastfile deleted file mode 100644 index 03a1ee178..000000000 --- a/fastlane_to_remove/Fastfile +++ /dev/null @@ -1,50 +0,0 @@ -# Customise this file, documentation can be found here: -# https://github.com/fastlane/fastlane/tree/master/fastlane/docs -# All available actions: https://docs.fastlane.tools/actions -# can also be listed using the `fastlane actions` command - -# Change the syntax highlighting to Ruby -# All lines starting with a # are ignored when running `fastlane` - -# If you want to automatically update fastlane if a new version is available: -# update_fastlane - -# This is the minimum version number required. -# Update this, if you use features of a newer version - -fastlane_version "2.70.1" - -default_platform :android - -platform :android do - - before_all do - skip_docs - end - - desc "Deploy workflow" - lane :beta do |options| - supply( - track: 'beta', - apk: "app/build/outputs/apk/release/app-release-unsigned-signed.apk", - skip_upload_aab: true, - changes_not_sent_for_review: true - ) - end - lane :alpha do |options| - supply( - track: 'alpha', - apk: "app/build/outputs/apk/release/app-release-unsigned-signed.apk", - skip_upload_aab: true, - changes_not_sent_for_review: true - ) - end - lane :playstore do |options| - supply( - track: 'production', - apk: "app/build/outputs/apk/release/app-release-unsigned-signed.apk", - skip_upload_aab: true, - changes_not_sent_for_review: true - ) - end -end diff --git a/fastlane_to_remove/README.md b/fastlane_to_remove/README.md deleted file mode 100644 index 4f5aeb779..000000000 --- a/fastlane_to_remove/README.md +++ /dev/null @@ -1,26 +0,0 @@ -# Fastlane - -Fastlane is a tool in ruby to release your iOS and Android app. - -More info: - - -In this android project we used to: - -- Deploy to Google play beta -- Deploy to Google play production - -## How to use - -In Appfile is the configuration with package name and json key file - -In Fastfile has our function: - -- Beta -- Playstore -- and send to telegram - -### In the folder actions we add custom actions - -- To sign the apk -- To zip and align the apk diff --git a/fastlane_to_remove/Screengrabfile b/fastlane_to_remove/Screengrabfile deleted file mode 100644 index 3930a4563..000000000 --- a/fastlane_to_remove/Screengrabfile +++ /dev/null @@ -1,15 +0,0 @@ -# remove the leading '#' to uncomment lines - -app_package_name 'org.glpi-project.inventory.agent' -use_tests_in_packages ['org.glpi.inventory.agent'] - -app_apk_path '/home/circleci/flyve_mdm/app/build/outputs/apk/debug/app-debug.apk' -tests_apk_path '/home/circleci/flyve_mdm/app/build/outputs/apk/androidTest/debug/app-debug-androidTest.apk' - -locales ['en-US', 'en-GB', 'fr-FR', 'es-ES', 'ko-KR', 'ru-RU'] - -# clear all previously generated screenshots in your local output directory before creating new ones -clear_previous_screenshots true - -# For more information about all available options run -# fastlane screengrab --help \ No newline at end of file diff --git a/fastlane_to_remove/actions/sign_apk.rb b/fastlane_to_remove/actions/sign_apk.rb deleted file mode 100644 index 4e013bc11..000000000 --- a/fastlane_to_remove/actions/sign_apk.rb +++ /dev/null @@ -1,94 +0,0 @@ -module Fastlane - module Actions - module SharedValues - SIGNED_APK_PATH = :SIGNED_APK_PATH - end - - class SignApkAction < Action - def self.run(params) - - UI.user_error!("Couldn't find '*release-unsigned.apk' file at path 'app/build/outputs/apk/'") unless params[:apk_path] - - UI.user_error("Need keystore in order to sign apk") unless params[:keystore_path] - - sign_cmd = ["jarsigner -verbose -sigalg SHA1withRSA -digestalg SHA1"] - sign_cmd << ["-keystore #{params[:keystore_path].shellescape}" ] if params[:keystore_path] - sign_cmd << ["#{params[:apk_path].shellescape}"] if params[:apk_path] - sign_cmd << ["'#{params[:alias]}'"] if params[:alias] - sign_cmd << ["-keypass #{params[:keypass] ? params[:keypass] : params[:storepass]}"] if params[:keypass] || params[:storepass] - sign_cmd << ["-storepass #{params[:storepass]}"] if params[:storepass] - sign_cmd << ["-tsa #{params[:tsa]}"] if params[:tsa] - - if params[:signed_apk_path] - sign_cmd << ["-signedjar #{params[:signed_apk_path]}" ] - Actions.lane_context[SharedValues::SIGNED_APK_PATH] = "#{params[:signed_apk_path]}" - elsif params[:apk_path].include?("unsigned") - sign_cmd << ["-signedjar #{params[:apk_path].gsub('-unsigned', '')}"] - Actions.lane_context[SharedValues::SIGNED_APK_PATH] = "#{params[:apk_path].gsub('-unsigned', '')}" - end - - Fastlane::Actions.sh(sign_cmd, log: true) - end - - ##################################################### - # @!group Documentation - ##################################################### - - def self.description - "Sign a Android apk with a java keystore" - end - - def self.available_options - - apk_path_default = Dir["*.apk"].last || Dir[File.join("app", "build", "outputs", "apk", "*release-unsigned.apk")].last - - [ - FastlaneCore::ConfigItem.new(key: :apk_path, - env_name: "apk_path", - description: "Path to your APK file that you want to sign", - default_value: Actions.lane_context[SharedValues::GRADLE_APK_OUTPUT_PATH] || apk_path_default, - optional: true), - FastlaneCore::ConfigItem.new(key: :signed_apk_path, - env_name: "SIGNED_APK_PATH", - description: "Path to the signed APK file", - optional: true, - is_string: true), - FastlaneCore::ConfigItem.new(key: :keystore_path, - env_name: "KEYSTORE_PATH", - description: "Path to java keystore", - optional: true), - FastlaneCore::ConfigItem.new(key: :alias, - env_name: "ALIAS", - description: "The alias of the certificate in the keystore to use to sign the apk", - is_string: true), - FastlaneCore::ConfigItem.new(key: :keypass, - env_name: "KEY_PASS", - description: "The password used to protect the private key of the keystore entry addressed by the alias specified. If not specified storepass will be used", - optional:true, - is_string: true), - FastlaneCore::ConfigItem.new(key: :storepass, - env_name: "STORE_PASS", - description: "The password which is required to access the keystore", - is_string: true), - FastlaneCore::ConfigItem.new(key: :tsa, - env_name: "TIME_STAMPING_AUTHORITHY", - description: "The url of the Time Stamping Authority (TSA) used to timestamp the apk signing", - optional:true, - is_string: true) - ] - end - - def self.output - ['SIGN_APK_PATH', 'Path to your APK file'] - end - - def self.authors - "nomisRev" - end - - def self.is_supported?(platform) - platform == :android - end - end - end -end diff --git a/fastlane_to_remove/actions/telegram.rb b/fastlane_to_remove/actions/telegram.rb deleted file mode 100644 index d1fd4df36..000000000 --- a/fastlane_to_remove/actions/telegram.rb +++ /dev/null @@ -1,59 +0,0 @@ -module Fastlane - module Actions - class TelegramAction < Action - def self.run(params) - require 'net/http' - require 'uri' - - uri = URI.parse(params[:url_horn]) - https = Net::HTTP.new(uri.host, uri.port) - https.use_ssl = true - - req = Net::HTTP::Post.new(uri.request_uri) - req.set_form_data({ - 'payload' => '{ "text": "' + params[:message] + "\\n- *Repo*: " + params[:repo] + "\\n- *Branch*: " + params[:branch] + "\\n- *Author*: " + Actions.git_author_email + '" }' - }) - - response = https.request(req) - UI.message(response) - end - - ##################################################### - # @!group Documentation - ##################################################### - - def self.description - "Telegram send message to telegram with @bullhorn_bot" - end - - def self.available_options - [ - FastlaneCore::ConfigItem.new(key: :url_horn, - env_name: "URL_HORN", - description: "Path from @bullhorn_bot on Telegram", - is_string: true), - FastlaneCore::ConfigItem.new(key: :message, - env_name: "MESSAGE", - description: "Text to send", - is_string: true), - FastlaneCore::ConfigItem.new(key: :repo, - env_name: "REPO", - description: "Get github repository", - is_string: true), - FastlaneCore::ConfigItem.new(key: :branch, - env_name: "BRANCH", - description: "Get github branch", - is_string: true) - ] - end - - def self.authors - ["rafaelje"] - end - - def self.is_supported?(platform) - true - end - end - end -end \ No newline at end of file diff --git a/fastlane_to_remove/actions/zipalign.rb b/fastlane_to_remove/actions/zipalign.rb deleted file mode 100644 index d945b74a5..000000000 --- a/fastlane_to_remove/actions/zipalign.rb +++ /dev/null @@ -1,58 +0,0 @@ -module Fastlane - module Actions - module SharedValues - ZIPALIGN_CUSTOM_VALUE = :ZIPALIGN_CUSTOM_VALUE - end - - class ZipalignAction < Action - def self.run(params) - - UI.user_error!("Couldn't find '*release.apk' file at path 'app/build/outputs/apk/'") unless params[:apk_path] - - error_callback = proc do |error| - new_name = params[:apk_path].gsub('.apk', '-unaligned.apk') - rename_command = ["mv -n",params[:apk_path],new_name] - Fastlane::Actions.sh(rename_command, log: false) - - aligncmd = ["$ANDROID_HOME/build-tools/$BUILD_TOOL/zipalign -v -f 4", new_name , " ", params[:apk_path] ] - Fastlane::Actions.sh(aligncmd, log: true) - - return - end - - zipalign = Fastlane::Actions.sh("$ANDROID_HOME/build-tools/$BUILD_TOOL/zipalign -c -v 4 #{params[:apk_path]}", log: false , error_callback: error_callback) - - UI.message('Input apk is aligned') - - end - ##################################################### - # @!group Documentation - ##################################################### - - def self.description - "Zipalign an apk. Input apk is renamed '*-unaligned.apk'" - end - - def self.available_options - - apk_path_default = Dir["*.apk"].last || Dir[File.join("app", "build", "outputs", "apk", "*release.apk")].last - - [ - FastlaneCore::ConfigItem.new(key: :apk_path, - env_name: "INPUT_APK_PATH", - description: "Path to your APK file that you want to align", - default_value: Actions.lane_context[SharedValues::GRADLE_APK_OUTPUT_PATH] || apk_path_default, - optional: true) - ] - end - - def self.authors - ["nomisRev"] - end - - def self.is_supported?(platform) - platform == :android - end - end - end -end