Strip rc suffix from version number properly (#268)

Previously the digit of the rc as well as the dash would remain
E.g.: `-rc2` -> `-2`
This resulted in it being subtracted from the patch version digit
E.g.: `v1.7.0-rc1` turns into `1,7,0-1`.

This commit strips the whole `-rcX` part of the version number in CI

Closes #265
This commit is contained in:
GeckoEidechse 2022-05-13 02:12:53 +02:00 committed by GitHub
parent 59d0566b37
commit d8ad8f12f8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -35,7 +35,7 @@ jobs:
working-directory: northstar-launcher
run: |
sed -i 's/DEV/${{ env.NORTHSTAR_VERSION }}/g' LauncherInjector/resources.rc
FILEVERSION=$(echo ${{ env.NORTHSTAR_VERSION }} | tr '.' ',' | tr -d '[:alpha:]')
FILEVERSION=$(echo ${{ env.NORTHSTAR_VERSION }} | tr '.' ',' | sed -E 's/-rc[0-9]+//' | tr -d '[:alpha:]')
sed -i "s/0,0,0,1/${FILEVERSION}/g" NorthstarDedicatedTest/ns_version.h
- name: Build
working-directory: northstar-launcher