From c927457ac6189abab3e94857bd917485f491bdd3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mathieu=20M=C3=A9a?= Date: Wed, 15 Apr 2026 17:11:26 -0400 Subject: [PATCH 01/24] Keep PNGs in repo to avoid running image gen during all CI --- shared/app-android/MT.gitignore | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/shared/app-android/MT.gitignore b/shared/app-android/MT.gitignore index 656aa033..f57259e5 100644 --- a/shared/app-android/MT.gitignore +++ b/shared/app-android/MT.gitignore @@ -68,7 +68,8 @@ proguard/ /src/main/play/listings/fr-FR/title.txt /src/main/play/listings/fr-FR/short-description.txt /src/main/play/listings/fr-FR/full-description.txt -/src/main/res/mipmap-*/module_app_icon* +# /src/main/res/mipmap-*/module_app_icon*.png # generated images optional +/src/main/res/mipmap-anydpi-v26/module_app_icon.xml /src/main/res/values/bike_station_strings.xml /src/main/res/values/strings.xml /src/main/res/values/gtfs_rts_strings.xml From 77a6bb3b05c8a84d04a8edc44c9a2e6d389bc3cd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mathieu=20M=C3=A9a?= Date: Wed, 15 Apr 2026 17:30:35 -0400 Subject: [PATCH 02/24] wip --- .../graphics/feature-graphic/MT1.png.MT.sh | 4 +- .../en-US/graphics/icon/MT1.png.MT.sh | 4 +- .../MTmodule_app_icon.png.MT.sh | 55 ++++++++++++------- 3 files changed, 37 insertions(+), 26 deletions(-) diff --git a/shared-modules/app-android/src/main/play/listings/en-US/graphics/feature-graphic/MT1.png.MT.sh b/shared-modules/app-android/src/main/play/listings/en-US/graphics/feature-graphic/MT1.png.MT.sh index 9f681913..04a2e72e 100755 --- a/shared-modules/app-android/src/main/play/listings/en-US/graphics/feature-graphic/MT1.png.MT.sh +++ b/shared-modules/app-android/src/main/play/listings/en-US/graphics/feature-graphic/MT1.png.MT.sh @@ -28,12 +28,10 @@ if [ -f "${FILE_1_PNG}" ]; then exit 0; # compat w/ manually created file else echo ">> File '$FILE_1_PNG' already exist: overriding image... (MT_GENERATE_IMAGES=$MT_GENERATE_IMAGES)"; + rm -f "${FILE_1_PNG}"; fi fi -rm -f "${FILE_1_PNG}"; -checkResult $?; - CONFIG_DIR="${ROOT_DIR}/config"; if [ ! -d "$CONFIG_DIR" ]; then echo "$CONFIG_DIR doesn't exist!"; diff --git a/shared-modules/app-android/src/main/play/listings/en-US/graphics/icon/MT1.png.MT.sh b/shared-modules/app-android/src/main/play/listings/en-US/graphics/icon/MT1.png.MT.sh index 9987833b..1ab9054d 100755 --- a/shared-modules/app-android/src/main/play/listings/en-US/graphics/icon/MT1.png.MT.sh +++ b/shared-modules/app-android/src/main/play/listings/en-US/graphics/icon/MT1.png.MT.sh @@ -28,12 +28,10 @@ if [ -f "${FILE_1_PNG}" ]; then exit 0; # compat w/ manually created file else echo ">> File '$FILE_1_PNG' already exist: overriding image... (MT_GENERATE_IMAGES=$MT_GENERATE_IMAGES)"; + rm -f "${FILE_1_PNG}"; fi fi -rm -f "${FILE_1_PNG}"; -checkResult $?; - $ROOT_DIR/commons-android/pub/module-hi-res-app-icon.sh; # uses inkscape checkResult $?; diff --git a/shared-modules/app-android/src/main/res/MTmipmap-MTSTAR/MTmodule_app_icon.png.MT.sh b/shared-modules/app-android/src/main/res/MTmipmap-MTSTAR/MTmodule_app_icon.png.MT.sh index 90d4f4c0..3eeadeb2 100755 --- a/shared-modules/app-android/src/main/res/MTmipmap-MTSTAR/MTmodule_app_icon.png.MT.sh +++ b/shared-modules/app-android/src/main/res/MTmipmap-MTSTAR/MTmodule_app_icon.png.MT.sh @@ -41,55 +41,70 @@ FILE_PNG="${MIPMAP_MDPI}/${FILE_NAME}"; mkdir -p "${MIPMAP_MDPI}"; checkResult $?; if [ -f "${FILE_PNG}" ]; then - echo ">> File '$FILE_PNG' already exist."; # compat with existing mipmap-*/module_app_icon.png - exit 0; # compat w/ manually created file + if [[ ${MT_GENERATE_IMAGES} != true ]]; then + echo ">> File '$FILE_PNG' already exist."; # compat with existing icon/1.png + exit 0; # compat w/ manually created file + else + echo ">> File '$FILE_PNG' already exist: overriding image... (MT_GENERATE_IMAGES=$MT_GENERATE_IMAGES)"; + rm -f "${FILE_PNG}"; + fi fi -rm -f "${FILE_PNG}"; -checkResult $?; MIPMAP_HDPI="${RES_DIR}/mipmap-hdpi"; FILE_PNG="${MIPMAP_HDPI}/${FILE_NAME}"; mkdir -p "${MIPMAP_HDPI}"; checkResult $?; if [ -f "${FILE_PNG}" ]; then - echo ">> File '$FILE_PNG' already exist."; # compat with existing mipmap-*/module_app_icon.png - exit 0; # compat w/ manually created file + if [[ ${MT_GENERATE_IMAGES} != true ]]; then + echo ">> File '$FILE_PNG' already exist."; # compat with existing mipmap-*/module_app_icon.png + exit 0; # compat w/ manually created file + else + echo ">> File '$FILE_PNG' already exist: overriding image... (MT_GENERATE_IMAGES=$MT_GENERATE_IMAGES)"; + rm -f "${FILE_PNG}"; + fi fi -rm -f "${FILE_PNG}"; -checkResult $?; MIPMAP_XHDPI="${RES_DIR}/mipmap-xhdpi"; FILE_PNG="${MIPMAP_XHDPI}/${FILE_NAME}"; mkdir -p "${MIPMAP_XHDPI}"; checkResult $?; if [ -f "${FILE_PNG}" ]; then - echo ">> File '$FILE_PNG' already exist."; # compat with existing mipmap-*/module_app_icon.png - exit 0; # compat w/ manually created file + if [[ ${MT_GENERATE_IMAGES} != true ]]; then + echo ">> File '$FILE_PNG' already exist."; # compat with existing mipmap-*/module_app_icon.png + exit 0; # compat w/ manually created file + else + echo ">> File '$FILE_PNG' already exist: overriding image... (MT_GENERATE_IMAGES=$MT_GENERATE_IMAGES)"; + rm -f "${FILE_PNG}"; + fi fi -rm -f "${FILE_PNG}"; -checkResult $?; MIPMAP_XXHDPI="${RES_DIR}/mipmap-xxhdpi"; FILE_PNG="${MIPMAP_XXHDPI}/${FILE_NAME}"; mkdir -p "${MIPMAP_XXHDPI}"; checkResult $?; if [ -f "${FILE_PNG}" ]; then - echo ">> File '$FILE_PNG' already exist."; # compat with existing mipmap-*/module_app_icon.png - exit 0; # compat w/ manually created file + if [[ ${MT_GENERATE_IMAGES} != true ]]; then + echo ">> File '$FILE_PNG' already exist."; # compat with existing mipmap-*/module_app_icon.png + exit 0; # compat w/ manually created file + else + echo ">> File '$FILE_PNG' already exist: overriding image... (MT_GENERATE_IMAGES=$MT_GENERATE_IMAGES)"; + rm -f "${FILE_PNG}"; + fi fi -rm -f "${FILE_PNG}"; -checkResult $?; MIPMAP_XXXHDPI="${RES_DIR}/mipmap-xxxhdpi"; FILE_PNG="${MIPMAP_XXXHDPI}/${FILE_NAME}"; mkdir -p "${MIPMAP_XXXHDPI}"; checkResult $?; if [ -f "${FILE_PNG}" ]; then - echo ">> File '$FILE_PNG' already exist."; # compat with existing mipmap-*/module_app_icon.png - exit 0; # compat w/ manually created file + if [[ ${MT_GENERATE_IMAGES} != true ]]; then + echo ">> File '$FILE_PNG' already exist."; # compat with existing mipmap-*/module_app_icon.png + exit 0; # compat w/ manually created file + else + echo ">> File '$FILE_PNG' already exist: overriding image... (MT_GENERATE_IMAGES=$MT_GENERATE_IMAGES)"; + rm -f "${FILE_PNG}"; + fi fi -rm -f "${FILE_PNG}"; -checkResult $?; $ROOT_DIR/commons-android/pub/module-res-mipmap-launcher-icon.sh; checkResult $?; From a60f3dc32524346c2ec24be9eb85456de4c93088 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mathieu=20M=C3=A9a?= Date: Thu, 16 Apr 2026 08:18:23 -0400 Subject: [PATCH 03/24] Update shared-modules/app-android/src/main/play/listings/en-US/graphics/feature-graphic/MT1.png.MT.sh Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com> --- .../play/listings/en-US/graphics/feature-graphic/MT1.png.MT.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/shared-modules/app-android/src/main/play/listings/en-US/graphics/feature-graphic/MT1.png.MT.sh b/shared-modules/app-android/src/main/play/listings/en-US/graphics/feature-graphic/MT1.png.MT.sh index 04a2e72e..e1d8def8 100755 --- a/shared-modules/app-android/src/main/play/listings/en-US/graphics/feature-graphic/MT1.png.MT.sh +++ b/shared-modules/app-android/src/main/play/listings/en-US/graphics/feature-graphic/MT1.png.MT.sh @@ -29,6 +29,7 @@ if [ -f "${FILE_1_PNG}" ]; then else echo ">> File '$FILE_1_PNG' already exist: overriding image... (MT_GENERATE_IMAGES=$MT_GENERATE_IMAGES)"; rm -f "${FILE_1_PNG}"; + checkResult $?; fi fi From 74a0c4ea2f6b837d2cfad5190fbca11d91ee263b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mathieu=20M=C3=A9a?= Date: Thu, 16 Apr 2026 08:18:33 -0400 Subject: [PATCH 04/24] Update shared-modules/app-android/src/main/play/listings/en-US/graphics/icon/MT1.png.MT.sh Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com> --- .../src/main/play/listings/en-US/graphics/icon/MT1.png.MT.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/shared-modules/app-android/src/main/play/listings/en-US/graphics/icon/MT1.png.MT.sh b/shared-modules/app-android/src/main/play/listings/en-US/graphics/icon/MT1.png.MT.sh index 1ab9054d..11056c7b 100755 --- a/shared-modules/app-android/src/main/play/listings/en-US/graphics/icon/MT1.png.MT.sh +++ b/shared-modules/app-android/src/main/play/listings/en-US/graphics/icon/MT1.png.MT.sh @@ -29,6 +29,7 @@ if [ -f "${FILE_1_PNG}" ]; then else echo ">> File '$FILE_1_PNG' already exist: overriding image... (MT_GENERATE_IMAGES=$MT_GENERATE_IMAGES)"; rm -f "${FILE_1_PNG}"; + checkResult $?; fi fi From 6acf320d4f8301161700fdaf1470d8b3e3acb3ff Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mathieu=20M=C3=A9a?= Date: Thu, 16 Apr 2026 08:19:03 -0400 Subject: [PATCH 05/24] PR comments --- .../MTmodule_app_icon.png.MT.sh | 83 ++++--------------- 1 file changed, 15 insertions(+), 68 deletions(-) diff --git a/shared-modules/app-android/src/main/res/MTmipmap-MTSTAR/MTmodule_app_icon.png.MT.sh b/shared-modules/app-android/src/main/res/MTmipmap-MTSTAR/MTmodule_app_icon.png.MT.sh index 3eeadeb2..7655cf23 100755 --- a/shared-modules/app-android/src/main/res/MTmipmap-MTSTAR/MTmodule_app_icon.png.MT.sh +++ b/shared-modules/app-android/src/main/res/MTmipmap-MTSTAR/MTmodule_app_icon.png.MT.sh @@ -36,75 +36,22 @@ fi FILE_NAME="module_app_icon.png"; -MIPMAP_MDPI="${RES_DIR}/mipmap-mdpi"; -FILE_PNG="${MIPMAP_MDPI}/${FILE_NAME}"; -mkdir -p "${MIPMAP_MDPI}"; -checkResult $?; -if [ -f "${FILE_PNG}" ]; then - if [[ ${MT_GENERATE_IMAGES} != true ]]; then - echo ">> File '$FILE_PNG' already exist."; # compat with existing icon/1.png - exit 0; # compat w/ manually created file - else - echo ">> File '$FILE_PNG' already exist: overriding image... (MT_GENERATE_IMAGES=$MT_GENERATE_IMAGES)"; - rm -f "${FILE_PNG}"; - fi -fi - -MIPMAP_HDPI="${RES_DIR}/mipmap-hdpi"; -FILE_PNG="${MIPMAP_HDPI}/${FILE_NAME}"; -mkdir -p "${MIPMAP_HDPI}"; -checkResult $?; -if [ -f "${FILE_PNG}" ]; then - if [[ ${MT_GENERATE_IMAGES} != true ]]; then - echo ">> File '$FILE_PNG' already exist."; # compat with existing mipmap-*/module_app_icon.png - exit 0; # compat w/ manually created file - else - echo ">> File '$FILE_PNG' already exist: overriding image... (MT_GENERATE_IMAGES=$MT_GENERATE_IMAGES)"; - rm -f "${FILE_PNG}"; - fi -fi - -MIPMAP_XHDPI="${RES_DIR}/mipmap-xhdpi"; -FILE_PNG="${MIPMAP_XHDPI}/${FILE_NAME}"; -mkdir -p "${MIPMAP_XHDPI}"; -checkResult $?; -if [ -f "${FILE_PNG}" ]; then - if [[ ${MT_GENERATE_IMAGES} != true ]]; then - echo ">> File '$FILE_PNG' already exist."; # compat with existing mipmap-*/module_app_icon.png - exit 0; # compat w/ manually created file - else - echo ">> File '$FILE_PNG' already exist: overriding image... (MT_GENERATE_IMAGES=$MT_GENERATE_IMAGES)"; - rm -f "${FILE_PNG}"; - fi -fi - -MIPMAP_XXHDPI="${RES_DIR}/mipmap-xxhdpi"; -FILE_PNG="${MIPMAP_XXHDPI}/${FILE_NAME}"; -mkdir -p "${MIPMAP_XXHDPI}"; -checkResult $?; -if [ -f "${FILE_PNG}" ]; then - if [[ ${MT_GENERATE_IMAGES} != true ]]; then - echo ">> File '$FILE_PNG' already exist."; # compat with existing mipmap-*/module_app_icon.png - exit 0; # compat w/ manually created file - else - echo ">> File '$FILE_PNG' already exist: overriding image... (MT_GENERATE_IMAGES=$MT_GENERATE_IMAGES)"; - rm -f "${FILE_PNG}"; - fi -fi - -MIPMAP_XXXHDPI="${RES_DIR}/mipmap-xxxhdpi"; -FILE_PNG="${MIPMAP_XXXHDPI}/${FILE_NAME}"; -mkdir -p "${MIPMAP_XXXHDPI}"; -checkResult $?; -if [ -f "${FILE_PNG}" ]; then - if [[ ${MT_GENERATE_IMAGES} != true ]]; then - echo ">> File '$FILE_PNG' already exist."; # compat with existing mipmap-*/module_app_icon.png - exit 0; # compat w/ manually created file - else - echo ">> File '$FILE_PNG' already exist: overriding image... (MT_GENERATE_IMAGES=$MT_GENERATE_IMAGES)"; - rm -f "${FILE_PNG}"; +for DENSITY in mdpi hdpi xhdpi xxhdpi xxxhdpi; do + MIPMAP_DIR="${RES_DIR}/mipmap-${DENSITY}" + FILE_PNG="${MIPMAP_DIR}/${FILE_NAME}" + mkdir -p "${MIPMAP_DIR}" + checkResult $?; + if [ -f "${FILE_PNG}" ]; then + if [[ ${MT_GENERATE_IMAGES} != true ]]; then + echo ">> File '$FILE_PNG' already exist."; # compat with existing mipmap-*/module_app_icon.png + exit 0; # compat w/ manually created file + else + echo ">> File '$FILE_PNG' already exist: overriding image... (MT_GENERATE_IMAGES=$MT_GENERATE_IMAGES)"; + rm -f "${FILE_PNG}"; + checkResult $?; + fi fi -fi +done $ROOT_DIR/commons-android/pub/module-res-mipmap-launcher-icon.sh; checkResult $?; From e36f19b7465b5a759702f523b6669ad8db10ad58 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mathieu=20M=C3=A9a?= Date: Thu, 16 Apr 2026 08:20:21 -0400 Subject: [PATCH 06/24] bump setup action --- shared-overwrite/.github/workflows/mt-download-data.yml | 2 +- shared-overwrite/.github/workflows/mt-record-screenshots.yml | 2 +- shared-overwrite/.github/workflows/mt-release.yml | 2 +- shared-overwrite/.github/workflows/mt-store-listing-pull.yml | 2 +- shared-overwrite/.github/workflows/mt-store-listing-push.yml | 2 +- shared-overwrite/.github/workflows/mt-sync-code-data.yml | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) diff --git a/shared-overwrite/.github/workflows/mt-download-data.yml b/shared-overwrite/.github/workflows/mt-download-data.yml index f344d0ee..994b9454 100644 --- a/shared-overwrite/.github/workflows/mt-download-data.yml +++ b/shared-overwrite/.github/workflows/mt-download-data.yml @@ -55,7 +55,7 @@ jobs: - name: MT setup if: steps.check-input-url.outputs.has_input_url == 'true' id: mt-setup - uses: mtransitapps/gh-actions/.github/actions/setup@v1.0.1 + uses: mtransitapps/gh-actions/.github/actions/setup@v1.1.0 with: code-sync: ${{ github.ref == format('refs/heads/{0}', env.MT_DEFAULT_BRANCH_NAME) }} diff --git a/shared-overwrite/.github/workflows/mt-record-screenshots.yml b/shared-overwrite/.github/workflows/mt-record-screenshots.yml index c2243574..ba2801a5 100644 --- a/shared-overwrite/.github/workflows/mt-record-screenshots.yml +++ b/shared-overwrite/.github/workflows/mt-record-screenshots.yml @@ -52,7 +52,7 @@ jobs: token: ${{ secrets.MT_PAT }} - name: MT setup - uses: mtransitapps/gh-actions/.github/actions/setup@v1.0.1 + uses: mtransitapps/gh-actions/.github/actions/setup@v1.1.0 - name: MT read sdk-target from gradle/libs.versions.toml id: sdk-target diff --git a/shared-overwrite/.github/workflows/mt-release.yml b/shared-overwrite/.github/workflows/mt-release.yml index 41a7b799..466c96d5 100644 --- a/shared-overwrite/.github/workflows/mt-release.yml +++ b/shared-overwrite/.github/workflows/mt-release.yml @@ -90,7 +90,7 @@ jobs: - name: MT setup id: mt-setup - uses: mtransitapps/gh-actions/.github/actions/setup@v1.0.1 + uses: mtransitapps/gh-actions/.github/actions/setup@v1.1.0 - name: MT enable app release run: | diff --git a/shared-overwrite/.github/workflows/mt-store-listing-pull.yml b/shared-overwrite/.github/workflows/mt-store-listing-pull.yml index 6010112c..2652160b 100644 --- a/shared-overwrite/.github/workflows/mt-store-listing-pull.yml +++ b/shared-overwrite/.github/workflows/mt-store-listing-pull.yml @@ -39,7 +39,7 @@ jobs: token: ${{ secrets.MT_PAT }} - name: MT setup - uses: mtransitapps/gh-actions/.github/actions/setup@v1.0.1 + uses: mtransitapps/gh-actions/.github/actions/setup@v1.1.0 - name: MT pull store listings env: diff --git a/shared-overwrite/.github/workflows/mt-store-listing-push.yml b/shared-overwrite/.github/workflows/mt-store-listing-push.yml index 9ee6b01b..b944d628 100644 --- a/shared-overwrite/.github/workflows/mt-store-listing-push.yml +++ b/shared-overwrite/.github/workflows/mt-store-listing-push.yml @@ -51,7 +51,7 @@ jobs: - name: MT setup id: mt-setup - uses: mtransitapps/gh-actions/.github/actions/setup@v1.0.1 + uses: mtransitapps/gh-actions/.github/actions/setup@v1.1.0 - name: MT push store listing run: ./app-android/listing_push.sh diff --git a/shared-overwrite/.github/workflows/mt-sync-code-data.yml b/shared-overwrite/.github/workflows/mt-sync-code-data.yml index 21decd0a..62cd7b64 100644 --- a/shared-overwrite/.github/workflows/mt-sync-code-data.yml +++ b/shared-overwrite/.github/workflows/mt-sync-code-data.yml @@ -96,7 +96,7 @@ jobs: - name: MT setup id: mt-setup - uses: mtransitapps/gh-actions/.github/actions/setup@v1.0.1 + uses: mtransitapps/gh-actions/.github/actions/setup@v1.1.0 with: code-sync: ${{ github.ref == format('refs/heads/{0}', env.MT_DEFAULT_BRANCH_NAME) }} From 1a14bbcf7fb4a970cd033322ea969b9c90e07dad Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mathieu=20M=C3=A9a?= Date: Thu, 16 Apr 2026 09:06:53 -0400 Subject: [PATCH 07/24] wip --- cleanup.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/cleanup.sh b/cleanup.sh index 6b62fd07..bdcf7711 100755 --- a/cleanup.sh +++ b/cleanup.sh @@ -118,9 +118,9 @@ function cleanupDirectory() { continue; fi local S_FILE_NAME_DEST=${S_FILE_NAME#"MT"}; # MT+filename used to ignore ".gitignore" - if [[ "$S_FILE_NAME_DEST" == *MTSTAR ]]; then - S_FILE_NAME_DEST_STARTS_WITH=${S_FILE_NAME_DEST%MTSTAR}; - S_FILE_NAME_DEST_LIST=$(find ${DEST_FILE_PATH}/ -mindepth 1 -maxdepth 1 -name "$S_FILE_NAME_DEST_STARTS_WITH*" -exec basename {} \; | xargs); + if [[ "$S_FILE_NAME_DEST" == *MTSTAR* ]]; then + S_FILE_NAME_DEST_REGEX=${S_FILE_NAME_DEST//MTSTAR*/*}; + S_FILE_NAME_DEST_LIST=$(find ${DEST_FILE_PATH}/ -mindepth 1 -maxdepth 1 -name "$S_FILE_NAME_DEST_REGEX" -exec basename {} \; | xargs); else # just use file name S_FILE_NAME_DEST_LIST="$S_FILE_NAME_DEST"; fi From cdf6b02261cebd9c85dd18679c4f2e33d693e565 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mathieu=20M=C3=A9a?= Date: Thu, 16 Apr 2026 09:07:13 -0400 Subject: [PATCH 08/24] wip --- ...MTmodule_app_icon.png.MT.sh => MTmodule_app_icon.MTSTAR.MT.sh} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename shared-modules/app-android/src/main/res/MTmipmap-MTSTAR/{MTmodule_app_icon.png.MT.sh => MTmodule_app_icon.MTSTAR.MT.sh} (100%) diff --git a/shared-modules/app-android/src/main/res/MTmipmap-MTSTAR/MTmodule_app_icon.png.MT.sh b/shared-modules/app-android/src/main/res/MTmipmap-MTSTAR/MTmodule_app_icon.MTSTAR.MT.sh similarity index 100% rename from shared-modules/app-android/src/main/res/MTmipmap-MTSTAR/MTmodule_app_icon.png.MT.sh rename to shared-modules/app-android/src/main/res/MTmipmap-MTSTAR/MTmodule_app_icon.MTSTAR.MT.sh From 3c77283dad62e25af2d51ccc6457a0d300512f43 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mathieu=20M=C3=A9a?= Date: Thu, 16 Apr 2026 09:09:46 -0400 Subject: [PATCH 09/24] wip --- cleanup.sh | 13 +++- code_setup.sh | 4 +- .../MTmodule_app_icon.MTSTAR.MT.sh | 70 +++++++++++++++++-- 3 files changed, 76 insertions(+), 11 deletions(-) diff --git a/cleanup.sh b/cleanup.sh index bdcf7711..3f2490be 100755 --- a/cleanup.sh +++ b/cleanup.sh @@ -19,8 +19,8 @@ setGitProjectName; setIsCI; -DEBUG_FILES=$IS_CI; -# DEBUG_FILES=true; +# DEBUG_FILES=$IS_CI; +DEBUG_FILES=true; function echoFile() { if [[ $DEBUG_FILES == true ]]; then echo "$@"; @@ -119,8 +119,17 @@ function cleanupDirectory() { fi local S_FILE_NAME_DEST=${S_FILE_NAME#"MT"}; # MT+filename used to ignore ".gitignore" if [[ "$S_FILE_NAME_DEST" == *MTSTAR* ]]; then + # echo ">> -----------------------------------------------------"; + # echo ">> S_FILE_NAME_DEST='$S_FILE_NAME_DEST'"; + # replace MTSTAR with * to find all generated files with same name starting with S_FILE_NAME_DEST without MTSTAR S_FILE_NAME_DEST_REGEX=${S_FILE_NAME_DEST//MTSTAR*/*}; + # echo ">> S_FILE_NAME_DEST_REGEX='$S_FILE_NAME_DEST_REGEX'"; + # S_FILE_NAME_DEST_REGEX=${S_FILE_NAME_DEST%MTSTAR}; + # echo ">> S_FILE_NAME_DEST_REGEX='$S_FILE_NAME_DEST_REGEX'"; + # echo ">> DEST_FILE_PATH='$DEST_FILE_PATH'"; S_FILE_NAME_DEST_LIST=$(find ${DEST_FILE_PATH}/ -mindepth 1 -maxdepth 1 -name "$S_FILE_NAME_DEST_REGEX" -exec basename {} \; | xargs); + # echo ">> S_FILE_NAME_DEST_LIST='$S_FILE_NAME_DEST_LIST'"; + # echo ">> -----------------------------------------------------"; else # just use file name S_FILE_NAME_DEST_LIST="$S_FILE_NAME_DEST"; fi diff --git a/code_setup.sh b/code_setup.sh index 68b4a5a7..aff6281a 100755 --- a/code_setup.sh +++ b/code_setup.sh @@ -19,8 +19,8 @@ setGitProjectName; setIsCI; -DEBUG_FILES=$IS_CI; -# DEBUG_FILES=true; +# DEBUG_FILES=$IS_CI; +DEBUG_FILES=true; function echoFile() { if [[ $DEBUG_FILES == true ]]; then echo "$@"; diff --git a/shared-modules/app-android/src/main/res/MTmipmap-MTSTAR/MTmodule_app_icon.MTSTAR.MT.sh b/shared-modules/app-android/src/main/res/MTmipmap-MTSTAR/MTmodule_app_icon.MTSTAR.MT.sh index 7655cf23..759e49db 100755 --- a/shared-modules/app-android/src/main/res/MTmipmap-MTSTAR/MTmodule_app_icon.MTSTAR.MT.sh +++ b/shared-modules/app-android/src/main/res/MTmipmap-MTSTAR/MTmodule_app_icon.MTSTAR.MT.sh @@ -15,27 +15,81 @@ APP_ANDROID_DIR="${ROOT_DIR}/app-android"; SRC_DIR="${APP_ANDROID_DIR}/src"; MAIN_DIR="${SRC_DIR}/main"; RES_DIR="${MAIN_DIR}/res"; +VALUES_DIR="${RES_DIR}/values" +mkdir -p "${VALUES_DIR}"; +checkResult $?; -REQUIRED_ICON_FILE="${MAIN_DIR}/play/listings/en-US/graphics/icon/1.png"; -if [ ! -f "$REQUIRED_ICON_FILE" ]; then - $ROOT_DIR/commons/shared-modules/app-android/src/main/play/listings/en-US/graphics/icon/MT1.png.MT.sh; - checkResult $?; +### values/module_app_icon_color.xml - START + +COLOR_FILE_NAME_XML="module_app_icon_color.xml" +COLOR_FILE_XML="${VALUES_DIR}/${COLOR_FILE_NAME_XML}"; +if [ -f "${COLOR_FILE_XML}" ]; then + echo ">> File '$COLOR_FILE_XML' already exist."; # compat with existing values/module_app_icon_color.xml +else + rm -f "${COLOR_FILE_XML}"; + checkResult $?; + touch "${COLOR_FILE_XML}"; + checkResult $?; + cat >>"${COLOR_FILE_XML}" < + + + #${COLOR} + +EOL + if [[ ${DEBUGING} = true ]]; then + echoDebug "---------------------------------------------------------------------------------------------------------------" + cat "${COLOR_FILE_XML}"; #DEBUG + echoDebug "---------------------------------------------------------------------------------------------------------------" + fi fi +### values/module_app_icon_color.xml - END + +### mipmap-anydpi-v26/module_app_icon.xml - START + FILE_NAME_XML="module_app_icon.xml" MIPMAP_ANYDPI="${RES_DIR}/mipmap-anydpi-v26" -FILE_XML="${MIPMAP_ANYDPI}/${FILE_NAME_XML}"; mkdir -p "${MIPMAP_ANYDPI}"; checkResult $?; +FILE_XML="${MIPMAP_ANYDPI}/${FILE_NAME_XML}"; if [ -f "${FILE_XML}" ]; then echo ">> File '$FILE_XML' already exist."; # compat with existing mipmap-anydpi-v26/module_app_icon.xml else - $ROOT_DIR/commons-android/pub/module-res-mipmap-launcher-icon-adaptive.sh; + rm -f "${FILE_XML}"; checkResult $?; + touch "${FILE_XML}"; + checkResult $?; + cat >>"${FILE_XML}" < + + + + + + +EOL + if [[ ${DEBUGING} = true ]]; then + echoDebug "---------------------------------------------------------------------------------------------------------------" + cat "${FILE_XML}"; #DEBUG + echoDebug "---------------------------------------------------------------------------------------------------------------" + fi fi -FILE_NAME="module_app_icon.png"; +$ROOT_DIR/commons-android/pub/module-res-mipmap-launcher-icon-adaptive.sh; +checkResult $?; + +### mipmap-anydpi-v26/module_app_icon.xml - END + +### mipmap-*/module_app_icon.png - START + +REQUIRED_ICON_FILE="${MAIN_DIR}/play/listings/en-US/graphics/icon/1.png"; +if [ ! -f "$REQUIRED_ICON_FILE" ]; then + $ROOT_DIR/commons/shared-modules/app-android/src/main/play/listings/en-US/graphics/icon/MT1.png.MT.sh; + checkResult $?; +fi +FILE_NAME="module_app_icon.png"; for DENSITY in mdpi hdpi xhdpi xxhdpi xxxhdpi; do MIPMAP_DIR="${RES_DIR}/mipmap-${DENSITY}" FILE_PNG="${MIPMAP_DIR}/${FILE_NAME}" @@ -56,4 +110,6 @@ done $ROOT_DIR/commons-android/pub/module-res-mipmap-launcher-icon.sh; checkResult $?; +### mipmap-*/module_app_icon.png - END + echo ">> Generating mipmap-*/module_app_icon.[png|xml]... DONE"; \ No newline at end of file From 03109cc575e1dbb558aee01e0124ebcaec74b729 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mathieu=20M=C3=A9a?= Date: Thu, 16 Apr 2026 09:12:00 -0400 Subject: [PATCH 10/24] clean --- cleanup.sh | 13 ++----------- code_setup.sh | 4 ++-- .../MTmipmap-MTSTAR/MTmodule_app_icon.MTSTAR.MT.sh | 2 +- 3 files changed, 5 insertions(+), 14 deletions(-) diff --git a/cleanup.sh b/cleanup.sh index 3f2490be..bdcf7711 100755 --- a/cleanup.sh +++ b/cleanup.sh @@ -19,8 +19,8 @@ setGitProjectName; setIsCI; -# DEBUG_FILES=$IS_CI; -DEBUG_FILES=true; +DEBUG_FILES=$IS_CI; +# DEBUG_FILES=true; function echoFile() { if [[ $DEBUG_FILES == true ]]; then echo "$@"; @@ -119,17 +119,8 @@ function cleanupDirectory() { fi local S_FILE_NAME_DEST=${S_FILE_NAME#"MT"}; # MT+filename used to ignore ".gitignore" if [[ "$S_FILE_NAME_DEST" == *MTSTAR* ]]; then - # echo ">> -----------------------------------------------------"; - # echo ">> S_FILE_NAME_DEST='$S_FILE_NAME_DEST'"; - # replace MTSTAR with * to find all generated files with same name starting with S_FILE_NAME_DEST without MTSTAR S_FILE_NAME_DEST_REGEX=${S_FILE_NAME_DEST//MTSTAR*/*}; - # echo ">> S_FILE_NAME_DEST_REGEX='$S_FILE_NAME_DEST_REGEX'"; - # S_FILE_NAME_DEST_REGEX=${S_FILE_NAME_DEST%MTSTAR}; - # echo ">> S_FILE_NAME_DEST_REGEX='$S_FILE_NAME_DEST_REGEX'"; - # echo ">> DEST_FILE_PATH='$DEST_FILE_PATH'"; S_FILE_NAME_DEST_LIST=$(find ${DEST_FILE_PATH}/ -mindepth 1 -maxdepth 1 -name "$S_FILE_NAME_DEST_REGEX" -exec basename {} \; | xargs); - # echo ">> S_FILE_NAME_DEST_LIST='$S_FILE_NAME_DEST_LIST'"; - # echo ">> -----------------------------------------------------"; else # just use file name S_FILE_NAME_DEST_LIST="$S_FILE_NAME_DEST"; fi diff --git a/code_setup.sh b/code_setup.sh index aff6281a..68b4a5a7 100755 --- a/code_setup.sh +++ b/code_setup.sh @@ -19,8 +19,8 @@ setGitProjectName; setIsCI; -# DEBUG_FILES=$IS_CI; -DEBUG_FILES=true; +DEBUG_FILES=$IS_CI; +# DEBUG_FILES=true; function echoFile() { if [[ $DEBUG_FILES == true ]]; then echo "$@"; diff --git a/shared-modules/app-android/src/main/res/MTmipmap-MTSTAR/MTmodule_app_icon.MTSTAR.MT.sh b/shared-modules/app-android/src/main/res/MTmipmap-MTSTAR/MTmodule_app_icon.MTSTAR.MT.sh index 759e49db..a6e00fd6 100755 --- a/shared-modules/app-android/src/main/res/MTmipmap-MTSTAR/MTmodule_app_icon.MTSTAR.MT.sh +++ b/shared-modules/app-android/src/main/res/MTmipmap-MTSTAR/MTmodule_app_icon.MTSTAR.MT.sh @@ -112,4 +112,4 @@ checkResult $?; ### mipmap-*/module_app_icon.png - END -echo ">> Generating mipmap-*/module_app_icon.[png|xml]... DONE"; \ No newline at end of file +echo ">> Generating mipmap-*/module_app_icon.[png|xml]... DONE"; From 9b1c2c10372d1a6bb243352ca1cfae9df3f9ce09 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mathieu=20M=C3=A9a?= Date: Thu, 16 Apr 2026 09:23:22 -0400 Subject: [PATCH 11/24] image gen workflow --- .../.github/workflows/mt-image-gen.yml | 129 ++++++++++++++++++ 1 file changed, 129 insertions(+) create mode 100644 shared-overwrite/.github/workflows/mt-image-gen.yml diff --git a/shared-overwrite/.github/workflows/mt-image-gen.yml b/shared-overwrite/.github/workflows/mt-image-gen.yml new file mode 100644 index 00000000..2b004359 --- /dev/null +++ b/shared-overwrite/.github/workflows/mt-image-gen.yml @@ -0,0 +1,129 @@ +# ORIGINAL FILE: https://github.com/mtransitapps/commons/tree/master/shared-overwrite +name: MT generate images +on: + workflow_dispatch: # manual + inputs: + commitDirectly: + description: 'Commit directly to current branch (without PR)' + required: false + default: false + type: boolean +# gh workflow run mt-image-gen.yml --ref $(git rev-parse --abbrev-ref HEAD) +# gh workflow run mt-image-gen.yml --ref $(git rev-parse --abbrev-ref HEAD) -f commitDirectly=true +# gh run list --workflow=mt-image-gen.yml +# gh run watch +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true +env: + MT_BOT_USER_NAME: ${{ vars.MT_BOT_USER_NAME }} + MT_BOT_USER_EMAIL: ${{ vars.MT_BOT_USER_EMAIL }} + # git branches & sha + MT_SHA: ${{ github.event.pull_request.head.sha || github.sha }} + MT_BRANCH_NAME: ${{ github.head_ref || github.ref_name }} + MT_TARGET_BRANCH_NAME: ${{ github.base_ref || github.ref_name }} + MT_DEFAULT_BRANCH_NAME: ${{ github.event.repository.default_branch }} + # repo type + MT_IS_SUBMODULE: ${{ contains(fromJSON('["mtransitapps/commons", "mtransitapps/commons-java", "mtransitapps/parser", "mtransitapps/commons-android"]'), github.repository) }} + MT_IS_MAIN_REPO: ${{ endsWith(github.repository, '/mtransit-for-android') }} + MT_IS_AGENCY_REPO: ${{ ! contains(fromJSON('["mtransitapps/commons", "mtransitapps/commons-java", "mtransitapps/parser", "mtransitapps/commons-android"]'), github.repository) && ! endsWith(github.repository, '/mtransit-for-android')}} + MT_IS_AGENCY_RDS: ${{ ! contains(github.repository, '-bike-') }} + MT_IS_AGENCY_BIKE: ${{ contains(github.repository, '-bike-') }} + # git commit & push + MT_ORG_GIT_COMMIT_ON: ${{ secrets.MT_ORG_GIT_COMMIT_ON }} + MT_ORG_GIT_COMMIT_OFF: ${{ secrets.MT_ORG_GIT_COMMIT_OFF }} + MT_GIT_COMMIT_ON: ${{ secrets.MT_GIT_COMMIT_ON }} + MT_GIT_COMMIT_OFF: ${{ secrets.MT_GIT_COMMIT_OFF }} +jobs: + MT-GENERATE-IMAGES-JOB: + name: "MT generate images" + timeout-minutes: 30 + runs-on: ubuntu-latest + steps: + - name: MT check out main repository code + uses: actions/checkout@v6 + with: + token: ${{ secrets.MT_PAT }} + + - name: MT setup + uses: mtransitapps/gh-actions/.github/actions/setup@v1.1.0 + with: + image-gen: true + + - name: MT upload images? + if: always() + uses: actions/upload-artifact@v7 + with: + name: images-${{ github.sha }} + path: | + app-android/src/main/play/listings/*/graphics/feature-graphic/*.png + app-android/src/main/play/listings/*/graphics/icon/*.png + app-android/src/main/res/mipmap-*/module_app_icon*.png + retention-days: 30 + if-no-files-found: warn + + - name: MT commit images + continue-on-error: true + id: mt-commit-images + run: | + # Check if images were generated + IMAGE_COUNT=$(find app-android/src/main/play/listings -type f -name '*.png' 2>/dev/null | wc -l) + if [ "$IMAGE_COUNT" -gt 0 ]; then + echo "Found $IMAGE_COUNT image file(s)." + git add -v -A app-android/src/main/play/listings/ + if git diff --staged --quiet; then + echo "No new images to commit." + exit 1 # fail == no PR needed + fi + git config user.name "$MT_BOT_USER_NAME" + git config user.email "$MT_BOT_USER_EMAIL" + if [ "${{ github.event.inputs.commitDirectly }}" = "true" ]; then + echo "Committing directly to current branch: ${MT_BRANCH_NAME}" + git commit -m "Update images in \`${MT_BRANCH_NAME}\`" + git push origin "${MT_BRANCH_NAME}" + exit 1 # fail == no PR needed + else + echo "Creating new branch and preparing for PR: ${MT_BRANCH_NAME}_update_images" + git checkout -B "${MT_BRANCH_NAME}_update_images" + git commit -m "Update images in \`${MT_BRANCH_NAME}\`" + git push -u origin "${MT_BRANCH_NAME}_update_images" --force + fi + exit 0 # success == PR needed + else + echo "No images found." + exit 1 # fail == no PR needed + fi + + - name: MT check if PR exists + id: mt-check-pr-exists + if: ${{ steps.mt-commit-images.outcome == 'success' }} + continue-on-error: true + run: | + # Fetch the branch to ensure it exists in the remote tracking + git fetch origin "${MT_BRANCH_NAME}_update_images" || true + PR_COUNT=$(gh pr list --state open --head "${MT_BRANCH_NAME}_update_images" | wc -l) + echo "Pull requests found: $PR_COUNT." + if [[ $PR_COUNT -eq 0 ]]; then + exit 1 # fail == PR need to be created + else + exit 0 # success == PR need to be updated + fi + env: + GH_TOKEN: ${{ secrets.MT_PAT }} + + - name: MT create pull request (if necessary) + if: ${{ steps.mt-commit-images.outcome == 'success' && steps.mt-check-pr-exists.outcome == 'failure' }} + run: | + COMMIT_MSG=$(git log -1 --pretty=%B) + gh pr create --base "${MT_BRANCH_NAME}" --title "$COMMIT_MSG" --body "$COMMIT_MSG" --assignee montransit + gh pr comment --body "@mtransitapps/reviewers please review" # --reviewer mtransitapps/reviewers + env: + GH_TOKEN: ${{ secrets.MT_PAT }} + + - name: MT update pull request (if necessary) + if: ${{ steps.mt-commit-images.outcome == 'success' && steps.mt-check-pr-exists.outcome == 'success' }} + run: | + gh pr edit --add-assignee montransit --title "Update images in \`${MT_BRANCH_NAME}\`" + gh pr comment --body "@mtransitapps/reviewers please review" # --reviewer mtransitapps/reviewers + env: + GH_TOKEN: ${{ secrets.MT_PAT }} From 248b2a31665bf90f6d91cd45e5d9878a8c9d347e Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Thu, 16 Apr 2026 13:32:53 +0000 Subject: [PATCH 12/24] Use git status to compute IMAGE_COUNT for PNG changes Agent-Logs-Url: https://github.com/mtransitapps/commons/sessions/c6baf6aa-7b74-405d-b734-3b0fe2b817dc Co-authored-by: mmathieum <177998+mmathieum@users.noreply.github.com> --- shared-overwrite/.github/workflows/mt-image-gen.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/shared-overwrite/.github/workflows/mt-image-gen.yml b/shared-overwrite/.github/workflows/mt-image-gen.yml index 2b004359..3f93fdf3 100644 --- a/shared-overwrite/.github/workflows/mt-image-gen.yml +++ b/shared-overwrite/.github/workflows/mt-image-gen.yml @@ -67,9 +67,9 @@ jobs: id: mt-commit-images run: | # Check if images were generated - IMAGE_COUNT=$(find app-android/src/main/play/listings -type f -name '*.png' 2>/dev/null | wc -l) + IMAGE_COUNT=$(git status --porcelain -- ':(glob)**/*.png' | wc -l) if [ "$IMAGE_COUNT" -gt 0 ]; then - echo "Found $IMAGE_COUNT image file(s)." + echo "Found $IMAGE_COUNT changed PNG file(s)." git add -v -A app-android/src/main/play/listings/ if git diff --staged --quiet; then echo "No new images to commit." @@ -90,7 +90,7 @@ jobs: fi exit 0 # success == PR needed else - echo "No images found." + echo "No PNG changes found." exit 1 # fail == no PR needed fi From f13ab614cc207bd373003f0a9d403a5686451ac5 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Thu, 16 Apr 2026 13:34:15 +0000 Subject: [PATCH 13/24] Align PNG staging with git-based IMAGE_COUNT logic Agent-Logs-Url: https://github.com/mtransitapps/commons/sessions/c6baf6aa-7b74-405d-b734-3b0fe2b817dc Co-authored-by: mmathieum <177998+mmathieum@users.noreply.github.com> --- shared-overwrite/.github/workflows/mt-image-gen.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/shared-overwrite/.github/workflows/mt-image-gen.yml b/shared-overwrite/.github/workflows/mt-image-gen.yml index 3f93fdf3..adb9a19f 100644 --- a/shared-overwrite/.github/workflows/mt-image-gen.yml +++ b/shared-overwrite/.github/workflows/mt-image-gen.yml @@ -70,7 +70,7 @@ jobs: IMAGE_COUNT=$(git status --porcelain -- ':(glob)**/*.png' | wc -l) if [ "$IMAGE_COUNT" -gt 0 ]; then echo "Found $IMAGE_COUNT changed PNG file(s)." - git add -v -A app-android/src/main/play/listings/ + git add -v -A -- ':(glob)**/*.png' if git diff --staged --quiet; then echo "No new images to commit." exit 1 # fail == no PR needed From fede445a08b3ca0c4311f498c501458d64b40fe7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mathieu=20M=C3=A9a?= Date: Thu, 16 Apr 2026 09:40:56 -0400 Subject: [PATCH 14/24] Remove image upload step from mt-image-gen workflow Removed the image upload step from the workflow. --- shared-overwrite/.github/workflows/mt-image-gen.yml | 12 ------------ 1 file changed, 12 deletions(-) diff --git a/shared-overwrite/.github/workflows/mt-image-gen.yml b/shared-overwrite/.github/workflows/mt-image-gen.yml index adb9a19f..ef9a463a 100644 --- a/shared-overwrite/.github/workflows/mt-image-gen.yml +++ b/shared-overwrite/.github/workflows/mt-image-gen.yml @@ -50,18 +50,6 @@ jobs: with: image-gen: true - - name: MT upload images? - if: always() - uses: actions/upload-artifact@v7 - with: - name: images-${{ github.sha }} - path: | - app-android/src/main/play/listings/*/graphics/feature-graphic/*.png - app-android/src/main/play/listings/*/graphics/icon/*.png - app-android/src/main/res/mipmap-*/module_app_icon*.png - retention-days: 30 - if-no-files-found: warn - - name: MT commit images continue-on-error: true id: mt-commit-images From 74bc5402dbf28664540cc439c077fb6f07787f5a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mathieu=20M=C3=A9a?= Date: Thu, 16 Apr 2026 10:06:11 -0400 Subject: [PATCH 15/24] CI triggers --- shared-overwrite/.github/workflows/mt-image-gen.yml | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/shared-overwrite/.github/workflows/mt-image-gen.yml b/shared-overwrite/.github/workflows/mt-image-gen.yml index ef9a463a..62a4af2f 100644 --- a/shared-overwrite/.github/workflows/mt-image-gen.yml +++ b/shared-overwrite/.github/workflows/mt-image-gen.yml @@ -1,6 +1,16 @@ # ORIGINAL FILE: https://github.com/mtransitapps/commons/tree/master/shared-overwrite name: MT generate images on: + push: + branches: + - master + paths: + - 'app-android/src/main/res/values/gtfs_rts_values_gen.xml' # gtfs_rts_color | gtfs_rts_agency_type + - 'app-android/src/main/res/values/bike_station_values.xml' # bike_station_color | bike_station_agency_type + - 'config/gtfs/agency.json' # target_route_type_id | default_color + - 'config/agency_name' # feature graphic + - 'config/cities' # feature graphic + - 'config/state' # feature graphic workflow_dispatch: # manual inputs: commitDirectly: From 71c5599e640b9f8db8c75dd9f11aa86dff072bad Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mathieu=20M=C3=A9a?= Date: Thu, 16 Apr 2026 10:34:23 -0400 Subject: [PATCH 16/24] fix --- .../MTmodule_app_icon.MTSTAR.MT.sh | 24 +++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/shared-modules/app-android/src/main/res/MTmipmap-MTSTAR/MTmodule_app_icon.MTSTAR.MT.sh b/shared-modules/app-android/src/main/res/MTmipmap-MTSTAR/MTmodule_app_icon.MTSTAR.MT.sh index a6e00fd6..0b98eadf 100755 --- a/shared-modules/app-android/src/main/res/MTmipmap-MTSTAR/MTmodule_app_icon.MTSTAR.MT.sh +++ b/shared-modules/app-android/src/main/res/MTmipmap-MTSTAR/MTmodule_app_icon.MTSTAR.MT.sh @@ -26,6 +26,30 @@ COLOR_FILE_XML="${VALUES_DIR}/${COLOR_FILE_NAME_XML}"; if [ -f "${COLOR_FILE_XML}" ]; then echo ">> File '$COLOR_FILE_XML' already exist."; # compat with existing values/module_app_icon_color.xml else + requireCommand "xmllint" "libxml2-utils"; + requireCommand "jq"; + GTFS_RDS_VALUES_GEN_FILE="$VALUES_DIR/gtfs_rts_values_gen.xml"; # do not change to avoid breaking compat w/ old modules + BIKE_STATION_VALUES_FILE="$VALUES_DIR/bike_station_values.xml"; + AGENCY_JSON_FILE="$ROOT_DIR/config/gtfs/agency.json"; + COLOR="" + if [ -f $GTFS_RDS_VALUES_GEN_FILE ]; then #1st because color computed + echo "> Agency file: '$GTFS_RDS_VALUES_GEN_FILE'." + COLOR=$(xmllint --xpath "//resources/string[@name='gtfs_rts_color']/text()" "$GTFS_RDS_VALUES_GEN_FILE") + elif [ -f $AGENCY_JSON_FILE ]; then + echo "> Agency file: '$AGENCY_JSON_FILE'." + COLOR=$(jq -r '.default_color // empty' "$AGENCY_JSON_FILE") + elif [ -f $BIKE_STATION_VALUES_FILE ]; then + echo "> Agency file: '$BIKE_STATION_VALUES_FILE'." + COLOR=$(xmllint --xpath "//resources/string[@name='bike_station_color']/text()" "$BIKE_STATION_VALUES_FILE") + else + echo "> No agency file! (rds:$GTFS_RDS_VALUES_GEN_FILE|json:$AGENCY_JSON_FILE|bike:$BIKE_STATION_VALUES_FILE)" + exit 1 # error + fi + echo " - color: $COLOR" + if [ -z "$COLOR" ]; then + echo " > No color found for agency type!" + exit 1 # error + fi rm -f "${COLOR_FILE_XML}"; checkResult $?; touch "${COLOR_FILE_XML}"; From 5350c9738440a972db3abfc35ee0908bd38d1752 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mathieu=20M=C3=A9a?= Date: Fri, 17 Apr 2026 14:06:22 -0400 Subject: [PATCH 17/24] clean --- commons.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/commons.sh b/commons.sh index 53f3a77a..b6eeba37 100644 --- a/commons.sh +++ b/commons.sh @@ -255,6 +255,7 @@ function printGitStatus() { echo "> [GIT STATUS & LOG]..."; echo "'$(basename $PWD)'" git config --get remote.origin.url; + echo "> status:"; git status -sb; STAGED_DIFF=$(git diff --cached | head -n $DIFF_LIMIT); if [ -n "$STAGED_DIFF" ]; then @@ -276,6 +277,7 @@ function printGitStatus() { echo "$LOG"; echo "--------------------------------------------------"; git submodule foreach " + echo \"> status:\"; git status -sb; git config --get remote.origin.url; STAGED_DIFF=\$(git diff --cached | head -n $DIFF_LIMIT); From 0f7b70831e772053279dd4b154e83ce9f4cc058f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mathieu=20M=C3=A9a?= Date: Fri, 17 Apr 2026 14:22:32 -0400 Subject: [PATCH 18/24] wip --- .github/workflows/mt-dependency-update-baseline.yml | 10 +++++----- code_sync.sh | 2 +- shared-overwrite/.github/workflows/mt-image-gen.yml | 2 +- .../.github/workflows/mt-record-screenshots.yml | 2 +- .../.github/workflows/mt-store-channels.yml | 2 +- .../.github/workflows/mt-store-listing-pull.yml | 2 +- shared/build.sh | 2 +- sync.sh | 2 +- 8 files changed, 12 insertions(+), 12 deletions(-) diff --git a/.github/workflows/mt-dependency-update-baseline.yml b/.github/workflows/mt-dependency-update-baseline.yml index 17ac5d72..d524c3a2 100644 --- a/.github/workflows/mt-dependency-update-baseline.yml +++ b/.github/workflows/mt-dependency-update-baseline.yml @@ -55,21 +55,21 @@ jobs: fetch-depth: 0 # fetch all (not required util release build) - name: MT check out submodules run: ./checkout_submodules.sh - - name: MT check out all git submodule closest branch + - name: MT switch all git submodule closest branch if: github.event_name == 'pull_request' run: | - echo "[MT] > Checking out submodules closest branch, '$MT_BRANCH_NAME' or '$MT_TARGET_BRANCH_NAME' or '$MT_DEFAULT_BRANCH_NAME':" - git submodule foreach 'git checkout $MT_BRANCH_NAME || git checkout $MT_TARGET_BRANCH_NAME || git checkout $MT_DEFAULT_BRANCH_NAME' + echo "[MT] > Switching submodules closest branch, '$MT_BRANCH_NAME' or '$MT_TARGET_BRANCH_NAME' or '$MT_DEFAULT_BRANCH_NAME':" + git submodule foreach 'git switch $MT_BRANCH_NAME || git switch $MT_TARGET_BRANCH_NAME || git switch $MT_DEFAULT_BRANCH_NAME' echo "[MT] > Showing submodules current branch:" git submodule foreach 'git branch --show-current' - - name: MT check out this module repo build branch + - name: MT switch this module repo build branch run: | REPOSITORY_OWNER_AND_NAME=${{ github.repository }}; REPOSITORY_NAME=$(basename $REPOSITORY_OWNER_AND_NAME); echo "Repository name: '$REPOSITORY_NAME'." echo "Fetching from repo '$REPOSITORY_NAME':" git -C $REPOSITORY_NAME fetch -v --all; - echo "Checking our this repo '$REPOSITORY_NAME' workflow branch '$MT_BRANCH_NAME':" + echo "Switching this repo '$REPOSITORY_NAME' workflow branch '$MT_BRANCH_NAME':" git -C $REPOSITORY_NAME switch $MT_BRANCH_NAME; echo "Pulling from repo '$REPOSITORY_NAME':" git -C $REPOSITORY_NAME pull -v; diff --git a/code_sync.sh b/code_sync.sh index 4af93988..c3a31da8 100755 --- a/code_sync.sh +++ b/code_sync.sh @@ -31,7 +31,7 @@ echo "-------------------------------------------------------------------------- echo "> Checkout branch '$GIT_BRANCH'..."; git submodule foreach git fetch -v --all; git submodule foreach git branch -v -a; -git submodule foreach git checkout $GIT_BRANCH; +git submodule foreach git switch $GIT_BRANCH; # git submodule foreach git switch --guess $GIT_BRANCH; # EXPERIMENTAL RESULT=$?; if [[ ${RESULT} -ne 0 ]]; then diff --git a/shared-overwrite/.github/workflows/mt-image-gen.yml b/shared-overwrite/.github/workflows/mt-image-gen.yml index 62a4af2f..5121af48 100644 --- a/shared-overwrite/.github/workflows/mt-image-gen.yml +++ b/shared-overwrite/.github/workflows/mt-image-gen.yml @@ -82,7 +82,7 @@ jobs: exit 1 # fail == no PR needed else echo "Creating new branch and preparing for PR: ${MT_BRANCH_NAME}_update_images" - git checkout -B "${MT_BRANCH_NAME}_update_images" + git switch -c "${MT_BRANCH_NAME}_update_images" git commit -m "Update images in \`${MT_BRANCH_NAME}\`" git push -u origin "${MT_BRANCH_NAME}_update_images" --force fi diff --git a/shared-overwrite/.github/workflows/mt-record-screenshots.yml b/shared-overwrite/.github/workflows/mt-record-screenshots.yml index ba2801a5..01fde680 100644 --- a/shared-overwrite/.github/workflows/mt-record-screenshots.yml +++ b/shared-overwrite/.github/workflows/mt-record-screenshots.yml @@ -203,7 +203,7 @@ jobs: exit 1 # fail == no PR needed else echo "Creating new branch and preparing for PR: ${MT_BRANCH_NAME}_update_screenshots" - git checkout -B "${MT_BRANCH_NAME}_update_screenshots" + git switch -c "${MT_BRANCH_NAME}_update_screenshots" git commit -m "Update screenshots in \`${MT_BRANCH_NAME}\`" git push -u origin "${MT_BRANCH_NAME}_update_screenshots" --force fi diff --git a/shared-overwrite/.github/workflows/mt-store-channels.yml b/shared-overwrite/.github/workflows/mt-store-channels.yml index 5621d36d..4cc3ecd5 100644 --- a/shared-overwrite/.github/workflows/mt-store-channels.yml +++ b/shared-overwrite/.github/workflows/mt-store-channels.yml @@ -105,7 +105,7 @@ jobs: echo "No changes to commit." exit 1 # fail fi - git checkout -B "${MT_BRANCH_NAME}_update_store_channels" + git switch -c "${MT_BRANCH_NAME}_update_store_channels" git config user.name "$MT_BOT_USER_NAME" git config user.email "$MT_BOT_USER_EMAIL" git commit -m "Update store channels in \`${MT_BRANCH_NAME}\`" diff --git a/shared-overwrite/.github/workflows/mt-store-listing-pull.yml b/shared-overwrite/.github/workflows/mt-store-listing-pull.yml index 2652160b..cd06dfb9 100644 --- a/shared-overwrite/.github/workflows/mt-store-listing-pull.yml +++ b/shared-overwrite/.github/workflows/mt-store-listing-pull.yml @@ -55,7 +55,7 @@ jobs: echo "No changes to commit." exit 1 # fail == no PR needed fi - git checkout -B "${MT_BRANCH_NAME}_update_store_listings" + git switch -c "${MT_BRANCH_NAME}_update_store_listings" git config user.name "$MT_BOT_USER_NAME" git config user.email "$MT_BOT_USER_EMAIL" git commit -m "Update store listings in \`${MT_BRANCH_NAME}\`" diff --git a/shared/build.sh b/shared/build.sh index 575a4f23..ca92955c 100755 --- a/shared/build.sh +++ b/shared/build.sh @@ -49,7 +49,7 @@ if [[ $CIRCLECI != "true" ]]; then echo "> GIT repo up-to-date in '$DIRECTORY' (local:$GIT_REV_PARSE_HEAD|origin/$GIT_BRANCH:$GIT_REV_PARSE_REMOTE_BRANCH)."; fi - git checkout ${GIT_BRANCH}; + git switch ${GIT_BRANCH}; checkResult $? ${CONFIRM}; echo "> GIT cleaning in '$DIRECTORY'... DONE"; cd ..; diff --git a/sync.sh b/sync.sh index 118cca9d..fab3df85 100755 --- a/sync.sh +++ b/sync.sh @@ -123,7 +123,7 @@ for S in "${!SUBMODULES[@]}"; do echo " DONE ✓"; fi echo "> Setting submodule branch '$GIT_BRANCH' in '$SUBMODULE'..."; - git checkout $GIT_BRANCH; + git switch $GIT_BRANCH; RESULT=$?; if [[ ${RESULT} -ne 0 ]]; then echo "> Error while checking out '$GIT_BRANCH' in '$SUBMODULE_REPO' submodule in '$SUBMODULE'!"; From ad3ec3a140a82eb0c49734d332fddad8787fa3af Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mathieu=20M=C3=A9a?= Date: Fri, 17 Apr 2026 15:11:00 -0400 Subject: [PATCH 19/24] latest --- shared-overwrite/.github/workflows/mt-download-data.yml | 2 +- shared-overwrite/.github/workflows/mt-image-gen.yml | 2 +- shared-overwrite/.github/workflows/mt-record-screenshots.yml | 2 +- shared-overwrite/.github/workflows/mt-release.yml | 2 +- shared-overwrite/.github/workflows/mt-store-listing-pull.yml | 2 +- shared-overwrite/.github/workflows/mt-store-listing-push.yml | 2 +- shared-overwrite/.github/workflows/mt-sync-code-data.yml | 2 +- 7 files changed, 7 insertions(+), 7 deletions(-) diff --git a/shared-overwrite/.github/workflows/mt-download-data.yml b/shared-overwrite/.github/workflows/mt-download-data.yml index 994b9454..2ac7bc17 100644 --- a/shared-overwrite/.github/workflows/mt-download-data.yml +++ b/shared-overwrite/.github/workflows/mt-download-data.yml @@ -55,7 +55,7 @@ jobs: - name: MT setup if: steps.check-input-url.outputs.has_input_url == 'true' id: mt-setup - uses: mtransitapps/gh-actions/.github/actions/setup@v1.1.0 + uses: mtransitapps/gh-actions/.github/actions/setup@v1.1.2 with: code-sync: ${{ github.ref == format('refs/heads/{0}', env.MT_DEFAULT_BRANCH_NAME) }} diff --git a/shared-overwrite/.github/workflows/mt-image-gen.yml b/shared-overwrite/.github/workflows/mt-image-gen.yml index 5121af48..89b2ebd3 100644 --- a/shared-overwrite/.github/workflows/mt-image-gen.yml +++ b/shared-overwrite/.github/workflows/mt-image-gen.yml @@ -56,7 +56,7 @@ jobs: token: ${{ secrets.MT_PAT }} - name: MT setup - uses: mtransitapps/gh-actions/.github/actions/setup@v1.1.0 + uses: mtransitapps/gh-actions/.github/actions/setup@v1.1.2 with: image-gen: true diff --git a/shared-overwrite/.github/workflows/mt-record-screenshots.yml b/shared-overwrite/.github/workflows/mt-record-screenshots.yml index 01fde680..212c7b91 100644 --- a/shared-overwrite/.github/workflows/mt-record-screenshots.yml +++ b/shared-overwrite/.github/workflows/mt-record-screenshots.yml @@ -52,7 +52,7 @@ jobs: token: ${{ secrets.MT_PAT }} - name: MT setup - uses: mtransitapps/gh-actions/.github/actions/setup@v1.1.0 + uses: mtransitapps/gh-actions/.github/actions/setup@v1.1.2 - name: MT read sdk-target from gradle/libs.versions.toml id: sdk-target diff --git a/shared-overwrite/.github/workflows/mt-release.yml b/shared-overwrite/.github/workflows/mt-release.yml index 466c96d5..1d53f83f 100644 --- a/shared-overwrite/.github/workflows/mt-release.yml +++ b/shared-overwrite/.github/workflows/mt-release.yml @@ -90,7 +90,7 @@ jobs: - name: MT setup id: mt-setup - uses: mtransitapps/gh-actions/.github/actions/setup@v1.1.0 + uses: mtransitapps/gh-actions/.github/actions/setup@v1.1.2 - name: MT enable app release run: | diff --git a/shared-overwrite/.github/workflows/mt-store-listing-pull.yml b/shared-overwrite/.github/workflows/mt-store-listing-pull.yml index cd06dfb9..4a9e1007 100644 --- a/shared-overwrite/.github/workflows/mt-store-listing-pull.yml +++ b/shared-overwrite/.github/workflows/mt-store-listing-pull.yml @@ -39,7 +39,7 @@ jobs: token: ${{ secrets.MT_PAT }} - name: MT setup - uses: mtransitapps/gh-actions/.github/actions/setup@v1.1.0 + uses: mtransitapps/gh-actions/.github/actions/setup@v1.1.2 - name: MT pull store listings env: diff --git a/shared-overwrite/.github/workflows/mt-store-listing-push.yml b/shared-overwrite/.github/workflows/mt-store-listing-push.yml index b944d628..dacaa099 100644 --- a/shared-overwrite/.github/workflows/mt-store-listing-push.yml +++ b/shared-overwrite/.github/workflows/mt-store-listing-push.yml @@ -51,7 +51,7 @@ jobs: - name: MT setup id: mt-setup - uses: mtransitapps/gh-actions/.github/actions/setup@v1.1.0 + uses: mtransitapps/gh-actions/.github/actions/setup@v1.1.2 - name: MT push store listing run: ./app-android/listing_push.sh diff --git a/shared-overwrite/.github/workflows/mt-sync-code-data.yml b/shared-overwrite/.github/workflows/mt-sync-code-data.yml index 9c539deb..72ce7d4a 100644 --- a/shared-overwrite/.github/workflows/mt-sync-code-data.yml +++ b/shared-overwrite/.github/workflows/mt-sync-code-data.yml @@ -106,7 +106,7 @@ jobs: - name: MT setup id: mt-setup - uses: mtransitapps/gh-actions/.github/actions/setup@v1.1.0 + uses: mtransitapps/gh-actions/.github/actions/setup@v1.1.2 with: code-sync: ${{ github.ref == format('refs/heads/{0}', env.MT_DEFAULT_BRANCH_NAME) }} From 9a242f19dad3a16745f6341b37d12defe2db6651 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mathieu=20M=C3=A9a?= Date: Fri, 17 Apr 2026 15:59:07 -0400 Subject: [PATCH 20/24] wip --- .../.github/workflows/mt-sync-code-data.yml | 39 ++++++++++++++++++- 1 file changed, 37 insertions(+), 2 deletions(-) diff --git a/shared-overwrite/.github/workflows/mt-sync-code-data.yml b/shared-overwrite/.github/workflows/mt-sync-code-data.yml index 72ce7d4a..fed7b13f 100644 --- a/shared-overwrite/.github/workflows/mt-sync-code-data.yml +++ b/shared-overwrite/.github/workflows/mt-sync-code-data.yml @@ -117,6 +117,7 @@ jobs: # DOWNLOAD (not PR) AND PARSE (NOT main repo/bike) - name: MT download data (& archive) if: ${{ github.event_name != 'pull_request' && env.MT_IS_AGENCY_BIKE != 'true' && env.MT_IS_MAIN_REPO != 'true' && github.event.inputs.skip-download-data != 'true' }} + id: mt-download-data timeout-minutes: 10 continue-on-error: true # optional (continue with archive data) run: ./download_only.sh @@ -146,12 +147,26 @@ jobs: if: ${{ env.MT_IS_AGENCY_BIKE != 'true' && env.MT_IS_MAIN_REPO != 'true' }} run: ./parse_list_change.sh + - name: MT check if image generation required + id: mt-check-image-gen-required + continue-on-error: true + if: ${{ env.MT_IS_AGENCY_BIKE != 'true' && env.MT_IS_MAIN_REPO != 'true' }} + run: | + RESULT=$(git diff-index --name-only HEAD -- "app-android/src/main/res/values/gtfs_rts_values_gen.xml" | wc -l) + if [ "$RESULT" -gt 0 ]; then + echo "Image generation required."; + exit 0 # success + else + echo "No image generation required."; + exit 1 # fail + fi + - name: MT push commits if: ${{ env.MT_IS_AGENCY_BIKE != 'true' && env.MT_IS_MAIN_REPO != 'true' }} run: ./push_commits.sh - name: MT artifact > GTFS files - if: ${{ !cancelled() && env.MT_IS_AGENCY_BIKE != 'true' && env.MT_IS_MAIN_REPO != 'true' }} # even if tests fails + if: ${{ !cancelled() && env.MT_IS_AGENCY_BIKE != 'true' && env.MT_IS_MAIN_REPO != 'true' && steps.mt-download-data.conclusion != 'skipped' }} # even if tests fails uses: actions/upload-artifact@v7 with: name: gtfs @@ -161,7 +176,7 @@ jobs: retention-days: 31 - name: MT artifact > GTFS validator results - if: ${{ !cancelled() && env.MT_IS_AGENCY_BIKE != 'true' && env.MT_IS_MAIN_REPO != 'true' }} # even if tests fails + if: ${{ !cancelled() && env.MT_IS_AGENCY_BIKE != 'true' && env.MT_IS_MAIN_REPO != 'true' && steps.mt-download-data.conclusion != 'skipped' }} # even if tests fails uses: actions/upload-artifact@v7 with: name: gtfs-validator-results @@ -174,6 +189,26 @@ jobs: run: ./commit_data_change.sh # ---------- + - name: MT generate images if required + if: ${{ env.MT_IS_AGENCY_BIKE != 'true' && env.MT_IS_MAIN_REPO != 'true' && steps.mt-check-image-gen-required.outcome == 'success' }} + run: | + ./commons/code_setup.sh; + env: + MT_GENERATE_IMAGES: true + + - name: MT commit image change + if: ${{ env.MT_IS_AGENCY_BIKE != 'true' && env.MT_IS_MAIN_REPO != 'true' && steps.mt-check-image-gen-required.outcome == 'success' }} + run: | + git add -v -A -- ':(glob)**/*.png' + if git diff --staged --quiet; then + echo "No new images to commit." + else + echo "Committing generated images."; + git config user.name "$MT_BOT_USER_NAME" + git config user.email "$MT_BOT_USER_EMAIL" + git commit -m "CI: update generated images" + fi + - name: MT set app release required (or not) if: ${{ github.event_name != 'pull_request' && github.event.inputs.skip-app-release != 'true' }} run: ./set_app_release_required.sh From 6921abd70fd7ff08c9378f3a6d25a389cb6b28ae Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mathieu=20M=C3=A9a?= Date: Fri, 17 Apr 2026 16:08:06 -0400 Subject: [PATCH 21/24] fix --- shared-overwrite/.github/workflows/mt-sync-code-data.yml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/shared-overwrite/.github/workflows/mt-sync-code-data.yml b/shared-overwrite/.github/workflows/mt-sync-code-data.yml index fed7b13f..f834bd5b 100644 --- a/shared-overwrite/.github/workflows/mt-sync-code-data.yml +++ b/shared-overwrite/.github/workflows/mt-sync-code-data.yml @@ -52,6 +52,8 @@ concurrency: group: ${{ github.workflow }}-${{ github.ref }} cancel-in-progress: true env: + MT_BOT_USER_NAME: ${{ vars.MT_BOT_USER_NAME }} + MT_BOT_USER_EMAIL: ${{ vars.MT_BOT_USER_EMAIL }} # git branches & sha MT_SHA: ${{ github.event.pull_request.head.sha || github.sha }} MT_BRANCH_NAME: ${{ github.head_ref || github.ref_name }} @@ -196,8 +198,8 @@ jobs: env: MT_GENERATE_IMAGES: true - - name: MT commit image change - if: ${{ env.MT_IS_AGENCY_BIKE != 'true' && env.MT_IS_MAIN_REPO != 'true' && steps.mt-check-image-gen-required.outcome == 'success' }} + - name: MT commit image change (if added/updated) + if: ${{ env.MT_IS_AGENCY_BIKE != 'true' && env.MT_IS_MAIN_REPO != 'true' }} run: | git add -v -A -- ':(glob)**/*.png' if git diff --staged --quiet; then From ffc5ccac7b343bd72e0388bc97b5581876bf4a85 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mathieu=20M=C3=A9a?= Date: Fri, 17 Apr 2026 16:16:51 -0400 Subject: [PATCH 22/24] fix --- .../MTmipmap-MTSTAR/MTmodule_app_icon.MTSTAR.MT.sh | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/shared-modules/app-android/src/main/res/MTmipmap-MTSTAR/MTmodule_app_icon.MTSTAR.MT.sh b/shared-modules/app-android/src/main/res/MTmipmap-MTSTAR/MTmodule_app_icon.MTSTAR.MT.sh index 0b98eadf..9da9f829 100755 --- a/shared-modules/app-android/src/main/res/MTmipmap-MTSTAR/MTmodule_app_icon.MTSTAR.MT.sh +++ b/shared-modules/app-android/src/main/res/MTmipmap-MTSTAR/MTmodule_app_icon.MTSTAR.MT.sh @@ -61,10 +61,10 @@ else #${COLOR} EOL - if [[ ${DEBUGING} = true ]]; then - echoDebug "---------------------------------------------------------------------------------------------------------------" + if [[ ${IS_CI} = true ]]; then + echo "---------------------------------------------------------------------------------------------------------------" cat "${COLOR_FILE_XML}"; #DEBUG - echoDebug "---------------------------------------------------------------------------------------------------------------" + echo "---------------------------------------------------------------------------------------------------------------" fi fi @@ -93,10 +93,10 @@ else EOL - if [[ ${DEBUGING} = true ]]; then - echoDebug "---------------------------------------------------------------------------------------------------------------" + if [[ ${IS_CI} = true ]]; then + echo "---------------------------------------------------------------------------------------------------------------" cat "${FILE_XML}"; #DEBUG - echoDebug "---------------------------------------------------------------------------------------------------------------" + echo "---------------------------------------------------------------------------------------------------------------" fi fi From 7a5b3cfab85d244baf05ecc91ed84cc3db40fe32 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Fri, 17 Apr 2026 20:20:09 +0000 Subject: [PATCH 23/24] Use git status porcelain for image generation trigger check Agent-Logs-Url: https://github.com/mtransitapps/commons/sessions/0e844d04-b3b1-4e79-80a2-721ae7bd8f4f Co-authored-by: mmathieum <177998+mmathieum@users.noreply.github.com> --- shared-overwrite/.github/workflows/mt-sync-code-data.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/shared-overwrite/.github/workflows/mt-sync-code-data.yml b/shared-overwrite/.github/workflows/mt-sync-code-data.yml index f834bd5b..ce79e81e 100644 --- a/shared-overwrite/.github/workflows/mt-sync-code-data.yml +++ b/shared-overwrite/.github/workflows/mt-sync-code-data.yml @@ -154,7 +154,7 @@ jobs: continue-on-error: true if: ${{ env.MT_IS_AGENCY_BIKE != 'true' && env.MT_IS_MAIN_REPO != 'true' }} run: | - RESULT=$(git diff-index --name-only HEAD -- "app-android/src/main/res/values/gtfs_rts_values_gen.xml" | wc -l) + RESULT=$(git status --porcelain -- "app-android/src/main/res/values/gtfs_rts_values_gen.xml" | wc -l) if [ "$RESULT" -gt 0 ]; then echo "Image generation required."; exit 0 # success From 35f7b84287e744cd8059b7f410cae049a5b5a4a7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mathieu=20M=C3=A9a?= Date: Fri, 17 Apr 2026 16:22:17 -0400 Subject: [PATCH 24/24] PR comment --- shared-overwrite/.github/workflows/mt-image-gen.yml | 2 +- shared-overwrite/.github/workflows/mt-record-screenshots.yml | 2 +- shared-overwrite/.github/workflows/mt-store-channels.yml | 2 +- shared-overwrite/.github/workflows/mt-store-listing-pull.yml | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/shared-overwrite/.github/workflows/mt-image-gen.yml b/shared-overwrite/.github/workflows/mt-image-gen.yml index 89b2ebd3..cc5530d7 100644 --- a/shared-overwrite/.github/workflows/mt-image-gen.yml +++ b/shared-overwrite/.github/workflows/mt-image-gen.yml @@ -82,7 +82,7 @@ jobs: exit 1 # fail == no PR needed else echo "Creating new branch and preparing for PR: ${MT_BRANCH_NAME}_update_images" - git switch -c "${MT_BRANCH_NAME}_update_images" + git switch -C "${MT_BRANCH_NAME}_update_images" git commit -m "Update images in \`${MT_BRANCH_NAME}\`" git push -u origin "${MT_BRANCH_NAME}_update_images" --force fi diff --git a/shared-overwrite/.github/workflows/mt-record-screenshots.yml b/shared-overwrite/.github/workflows/mt-record-screenshots.yml index 212c7b91..f6095197 100644 --- a/shared-overwrite/.github/workflows/mt-record-screenshots.yml +++ b/shared-overwrite/.github/workflows/mt-record-screenshots.yml @@ -203,7 +203,7 @@ jobs: exit 1 # fail == no PR needed else echo "Creating new branch and preparing for PR: ${MT_BRANCH_NAME}_update_screenshots" - git switch -c "${MT_BRANCH_NAME}_update_screenshots" + git switch -C "${MT_BRANCH_NAME}_update_screenshots" git commit -m "Update screenshots in \`${MT_BRANCH_NAME}\`" git push -u origin "${MT_BRANCH_NAME}_update_screenshots" --force fi diff --git a/shared-overwrite/.github/workflows/mt-store-channels.yml b/shared-overwrite/.github/workflows/mt-store-channels.yml index 4cc3ecd5..315f9927 100644 --- a/shared-overwrite/.github/workflows/mt-store-channels.yml +++ b/shared-overwrite/.github/workflows/mt-store-channels.yml @@ -105,7 +105,7 @@ jobs: echo "No changes to commit." exit 1 # fail fi - git switch -c "${MT_BRANCH_NAME}_update_store_channels" + git switch -C "${MT_BRANCH_NAME}_update_store_channels" git config user.name "$MT_BOT_USER_NAME" git config user.email "$MT_BOT_USER_EMAIL" git commit -m "Update store channels in \`${MT_BRANCH_NAME}\`" diff --git a/shared-overwrite/.github/workflows/mt-store-listing-pull.yml b/shared-overwrite/.github/workflows/mt-store-listing-pull.yml index 4a9e1007..3653bf38 100644 --- a/shared-overwrite/.github/workflows/mt-store-listing-pull.yml +++ b/shared-overwrite/.github/workflows/mt-store-listing-pull.yml @@ -55,7 +55,7 @@ jobs: echo "No changes to commit." exit 1 # fail == no PR needed fi - git switch -c "${MT_BRANCH_NAME}_update_store_listings" + git switch -C "${MT_BRANCH_NAME}_update_store_listings" git config user.name "$MT_BOT_USER_NAME" git config user.email "$MT_BOT_USER_EMAIL" git commit -m "Update store listings in \`${MT_BRANCH_NAME}\`"