Skip to content

Commit

Permalink
Make debian version compliant
Browse files Browse the repository at this point in the history
Fix warnings related to:
- Version number
- File too long
- No contributor name
- Extra whitespace around name
  • Loading branch information
EduardGomezEscandell committed Feb 9, 2024
1 parent 918af21 commit 9eb66d6
Showing 1 changed file with 13 additions and 3 deletions.
16 changes: 13 additions & 3 deletions gh-actions/common/build-debian/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -55,10 +55,20 @@ runs:
DEBIAN_FRONTEND=noninteractive sudo apt install -y devscripts
echo "::endgroup::"
echo "::group::Append commit SHA to local version"
echo "::group::Create local version with commit and docker container"
cd '${{ inputs.source-dir }}'
sanitized_docker=$( echo "${{ inputs.docker-image }}" | sed 's/://' )
debchange --local "+${sanitized_docker}+${{ github.sha }}" "Github build. Job id: ${{ github.run_id }}. Attempt: ${{ github.run_number }}."
# Sanitize the docker name so that it stick to debian policy
# https://www.debian.org/doc/debian-policy/ch-controlfields.html#version
sanitized_docker=$( echo "${{ inputs.docker-image }}" | sed -r 's/[^a-zA-Z0-9.+~]+/+/g' )
# Short commit to avoid "package-has-long-file-name"
commit=$(echo ${{ github.sha }} | cut -c1-8)
export DEBFULLNAME="GitHub actions runner"
export DEBEMAIL="[email protected]"
debchange --local "~${sanitized_docker}+${commit}" "Github build. Run id: ${{ github.run_id }}. Run number: ${{ github.run_number }}."
echo "::endgroup::"
echo "::group::Parsing name and version"
Expand Down

0 comments on commit 9eb66d6

Please sign in to comment.