Uniform Versions

Contributes to CURA-9365
This commit is contained in:
j.spijker@ultimaker.com 2022-06-21 16:52:32 +02:00 committed by Jelle Spijker
parent d987c0190b
commit cef1e35190
2 changed files with 9 additions and 10 deletions

View File

@ -30,7 +30,9 @@ on:
branches: branches:
- main - main
- 'CURA-*' - 'CURA-*'
- '[4-9].[0-9]' - '^[\d]+.[\d]+$'
tags:
- '^[\d]+.[\d]+$'
pull_request: pull_request:
paths: paths:
@ -45,7 +47,7 @@ on:
- 'requirements*.txt' - 'requirements*.txt'
branches: branches:
- main - main
- '[4-9].[0-9]' - '^[\d]+.[\d]+$'
jobs: jobs:

View File

@ -56,7 +56,7 @@ jobs:
if [ "${{ github.event_name == 'merge' }}" = "true" ]; then if [ "${{ github.event_name == 'merge' }}" = "true" ]; then
echo $sanitized_pre_release_tag | awk '{print "::set-output name=PreReleaseTag::m_"substr(tolower($0),5,9)}' echo $sanitized_pre_release_tag | awk '{print "::set-output name=PreReleaseTag::m_"substr(tolower($0),5,9)}'
elif [ "${{ github.event_name == 'pull_request' }}" = "true" ]; then elif [ "${{ github.event_name == 'pull_request' }}" = "true" ]; then
echo $sanitized_pre_release_tag | awk '{print "::set-output name=PreReleaseTag::pr_"substr(tolower($0),5,9)}' echo $sanitized_pre_release_tag | awk '{print "::set-output name=PreReleaseTag::pr_"substr(tolower($0),12,21)}'
else else
echo $sanitized_pre_release_tag | awk '{print "::set-output name=PreReleaseTag::"substr(tolower($0),0,9)}' echo $sanitized_pre_release_tag | awk '{print "::set-output name=PreReleaseTag::"substr(tolower($0),0,9)}'
fi fi
@ -72,19 +72,16 @@ jobs:
elif [ "${{ steps.git-tool.outputs.fullSemVer == steps.git-tool.outputs.MajorMinorPatch }}" = "true" ]; then elif [ "${{ steps.git-tool.outputs.fullSemVer == steps.git-tool.outputs.MajorMinorPatch }}" = "true" ]; then
echo '::set-output name=user::_' echo '::set-output name=user::_'
echo '::set-output name=channel::_' echo '::set-output name=channel::_'
elif [ "${{ github.event_name == 'merge' || github.event_name == 'pull_request' }}" = "true" ]; then
echo ${{ github.repository_owner }} | awk '{print "::set-output name=user::"tolower($0)}'
echo '::set-output name=channel::testing'
else else
echo ${{ github.repository_owner }} | awk '{print "::set-output name=user::"tolower($0)}' echo ${{ github.repository_owner }} | awk '{print "::set-output name=user::"tolower($0//-/_)}'
echo ${{ github.ref_name }} | awk '{print "::set-output name=channel::"substr(tolower($0),0,9)}' echo '::set-output name=channel::testing'
fi fi
- name: Get latest alias - name: Get latest alias
id: latest-alias id: latest-alias
run: | run: |
# FIXME: Remove the CURA-8160 clause once merged to main # FIXME: Remove the CURA-9365 clause once merged to main
if [ "${{ github.ref_name == 'main' }}" = "true" || "${{ contains(github.ref_name, 'CURA-8160') }}" ]; then if [ "${{ github.ref_name == 'main' }}" = "true" || "${{ contains(github.ref_name, 'CURA-9365') }}" ]; then
echo "::set-output name=recipe_id_latest::${{ inputs.project_name }}/latest@${{ steps.get-conan-broadcast-data.outputs.user }}/${{ steps.get-conan-broadcast-data.outputs.channel }}" echo "::set-output name=recipe_id_latest::${{ inputs.project_name }}/latest@${{ steps.get-conan-broadcast-data.outputs.user }}/${{ steps.get-conan-broadcast-data.outputs.channel }}"
else else
echo "::set-output name=recipe_id_latest::''" echo "::set-output name=recipe_id_latest::''"