Grep issue causing the build to fail

I have been stuck on version code linter issue. With yaml -

Categories:
  - Multimedia
  - Development
License: GPL-3.0-only
AuthorName: Brahmadeo
SourceCode: https://github.com/DevGitPit/supertonic-android
IssueTracker: https://github.com/DevGitPit/supertonic-android/issues
Summary: Local AI Text-to-Speech using Supertonic ONNX
RepoType: git
Repo: https://github.com/DevGitPit/supertonic-android

AutoUpdateMode: Version
UpdateCheckMode: Tags
CurrentVersion: '1.2'
CurrentVersionCode: 3

Builds:
  - versionName: '1.2'
    versionCode: 3
    commit: v1.2
    gradle:
      - yes
    output: app/build/outputs/apk/release/app-release-unsigned.apk
    ndk: r26b
    sudo:
      - apt-get update
      - apt-get install -y build-essential pkg-config libssl-dev
    prebuild:
      - curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs -o rustup-init.sh
      - sh rustup-init.sh -y --default-toolchain stable
      - source $HOME/.cargo/env
      - rustup target add aarch64-linux-android armv7-linux-androideabi i686-linux-android x86_64-linux-android
      - mkdir -p rust/.cargo
      - echo '[target.aarch64-linux-android]' > rust/.cargo/config.toml
      - echo 'linker = "aarch64-linux-android34-clang"' >> rust/.cargo/config.toml
      - echo '[source.crates-io]' >> rust/.cargo/config.toml
      - echo 'replace-with = "vendored-sources"' >> rust/.cargo/config.toml
      - echo '[source.vendored-sources]' >> rust/.cargo/config.toml
      - echo 'directory = "vendor"' >> rust/.cargo/config.toml
    scanignore:
      - rust/vendor/wit-bindgen-0.51.0/wasi-cli@0.2.0.wasm
      - rust/vendor/regex-automata-0.4.13/tests/fuzz/testdata/

Output-

BUILD SUCCESSFUL in 3m 54s
54 actionable tasks: 54 executed
2026-01-23 14:49:48,162 DEBUG: Checking build/com.brahmadeo.supertonic.tts/app/build/outputs/apk/release/app-release-unsigned.apk
2026-01-23 14:49:48,168 INFO: Successfully built com.brahmadeo.supertonic.tts:3 from 358692377db70f7e99314022228a06154cc6a82d
2026-01-23 14:49:48,197 INFO: success: com.brahmadeo.supertonic.tts
2026-01-23 14:49:48,197 INFO: Finished
2026-01-23 14:49:48,198 INFO: 1 build succeeded
++ apt-get install sudo
Reading package lists...
Building dependency tree...
Reading state information...
The following NEW packages will be installed:
  sudo
0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
Need to get 2087 kB of archives.
After this operation, 6865 kB of additional disk space will be used.
Get:1 https://deb.debian.org/debian trixie/main amd64 sudo amd64 1.9.16p2-3 [2087 kB]
W: Target Packages (main/binary-amd64/Packages) is configured multiple times in /etc/apt/sources.list:1 and /etc/apt/sources.list.d/debian.sources:1
W: Target Packages (main/binary-all/Packages) is configured multiple times in /etc/apt/sources.list:1 and /etc/apt/sources.list.d/debian.sources:1
W: Target Packages (main/binary-amd64/Packages) is configured multiple times in /etc/apt/sources.list:3 and /etc/apt/sources.list.d/debian.sources:1
W: Target Packages (main/binary-all/Packages) is configured multiple times in /etc/apt/sources.list:3 and /etc/apt/sources.list.d/debian.sources:1
Fetched 2087 kB in 0s (13.3 MB/s)
Selecting previously unselected package sudo.
(Reading database ... 42221 files and directories currently installed.)
Preparing to unpack .../sudo_1.9.16p2-3_amd64.deb ...
Unpacking sudo (1.9.16p2-3) ...
Setting up sudo (1.9.16p2-3) ...
invoke-rc.d: could not determine current runlevel
invoke-rc.d: policy-rc.d denied execution of start.
Processing triggers for libc-bin (2.41-12+deb13u1) ...
W: Target Packages (main/binary-amd64/Packages) is configured multiple times in /etc/apt/sources.list:1 and /etc/apt/sources.list.d/debian.sources:1
W: Target Packages (main/binary-all/Packages) is configured multiple times in /etc/apt/sources.list:1 and /etc/apt/sources.list.d/debian.sources:1
W: Target Packages (main/binary-amd64/Packages) is configured multiple times in /etc/apt/sources.list:3 and /etc/apt/sources.list.d/debian.sources:1
W: Target Packages (main/binary-all/Packages) is configured multiple times in /etc/apt/sources.list:3 and /etc/apt/sources.list.d/debian.sources:1
/builds/pankaj.pal9/fdroiddata
++ popd
++ vercode=3
+++ grep -n '^    versionCode:\ 3$' metadata/com.brahmadeo.supertonic.tts.yml
+++ cut -f1 -d:
++ location=-1
Uploading artifacts for failed job
00:03
Uploading artifacts...
repo/: found 3 matching artifact files and directories 
unsigned/: found 1 matching artifact files and directories 
tmp/: found 2 matching artifact files and directories 
Uploading artifacts as "archive" to coordinator... 201 Created  correlation_id=27b45ea57bed410584ad2a428de7995b id=12840670038 responseStatus=201 Created token=6b_rWZBcD
Uploading artifacts...
WARNING: codequality.json: no matching files. Ensure that the artifact path is relative to the working directory (/builds/pankaj.pal9/fdroiddata) 
ERROR: No files to upload                          
Cleaning up project directory and file based variables
00:01
ERROR: Job failed: exit code 1

I ran the grep locally at it works.

Categories:
  - Development
  - Multimedia
License: GPL-3.0-only
AuthorName: Brahmadeo
SourceCode: https://github.com/DevGitPit/supertonic-android
IssueTracker: https://github.com/DevGitPit/supertonic-android/issues

RepoType: git
Repo: https://github.com/DevGitPit/supertonic-android

Builds:
  - versionName: '1.2'
    versionCode: 3
    commit: v1.2
    gradle:
      - yes
    output: app/build/outputs/apk/release/app-release-unsigned.apk
    sudo:
      - apt-get update
      - apt-get install -y build-essential pkg-config libssl-dev
    prebuild:
      - curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs -o rustup-init.sh
      - sh rustup-init.sh -y --default-toolchain stable
      - source $HOME/.cargo/env
      - rustup target add aarch64-linux-android armv7-linux-androideabi i686-linux-android x86_64-linux-android
      - mkdir -p rust/.cargo
      - echo '[target.aarch64-linux-android]' > rust/.cargo/config.toml
      - echo 'linker = "aarch64-linux-android34-clang"' >> rust/.cargo/config.toml
      - echo '[source.crates-io]' >> rust/.cargo/config.toml
      - echo 'replace-with = "vendored-sources"' >> rust/.cargo/config.toml
      - echo '[source.vendored-sources]' >> rust/.cargo/config.toml
      - echo 'directory = "vendor"' >> rust/.cargo/config.toml
    scandelete:
      - rust/vendor
    ndk: r26b

AutoUpdateMode: Version
UpdateCheckMode: Tags
CurrentVersion: '1.2'
CurrentVersionCode: 3

would be a bit better

if it says 2026-01-23 14:49:48,198 INFO: 1 build succeeded but then ERROR: Job failed: exit code 1 it usually means that your file has DOS endlines and you need to convert them ti UNIX endlines

Didn’t work this way as well. Since build is successful everytime, can I do anything else? How to notify the maintainers that the command itself might have issues?

Why don’t you open a Merge Request directly?

I have opened a merge request already. Just waiting on someone to either merge or reject with a reason so I can rather fix that, rather than waiting on the pipeline script to be fixed.