File tree Expand file tree Collapse file tree 4 files changed +21
-12
lines changed
Expand file tree Collapse file tree 4 files changed +21
-12
lines changed Original file line number Diff line number Diff line change @@ -17,7 +17,9 @@ if [ "$GITHUB_EVENT_NAME" == "pull_request" ]; then
1717 fi
1818else
1919 BRANCH=$( echo $GITHUB_REF | awk ' BEGIN { FS = "/" } ; { print $3 }' )
20- if [ " $BRANCH " != " master" ]; then
20+ if [ " $GITHUB_REF_TYPE " == " tag" ] && [[ " $BRANCH " =~ ^[0-9]+\. [0-9]+\. [0-9]+ (.+)$ ]]; then
21+ SUFFIX=" ${BASH_REMATCH[1]} "
22+ elif [ " $BRANCH " != " master" ]; then
2123 SUFFIX=" $BRANCH "
2224 fi
2325fi
Original file line number Diff line number Diff line change @@ -38,19 +38,25 @@ jobs:
3838 steps :
3939 - name : Checkout
4040 uses : actions/checkout@v6
41- - name : Package name
41+ - name : Package suffix
4242 shell : bash
4343 run : |
44- if [[ "${{ github.event_name }}" == "push" && "${{ github.ref_name }}" == "master" ]]; then
45- SUFFIX=""
46- elif [[ "${{ github.event_name }}" == "push" ]]; then
47- SUFFIX="-${{ github.ref_name }}"
48- elif [[ "${{ github.event_name }}" == "pull_request" && "${{ github.base_ref }}" == "master" ]]; then
49- SUFFIX="-pr${{ github.event.number }}"
50- else
51- SUFFIX="-${{ github.base_ref }}-pr${{ github.event.number }}"
44+ if [[ "${{ github.event_name }}" == "push" ]]; then
45+ if [[ "${{ github.ref_type }}" == "tag" && "${{ github.ref_name }}" =~ ^[0-9]+\.[0-9]+\.[0-9]+(.+)$ ]]; then
46+ SUFFIX="${BASH_REMATCH[1]}"
47+ elif [[ "${{ github.ref_name }}" != "master" ]]; then
48+ SUFFIX="-${{ github.ref_name }}"
49+ fi
50+ elif [[ "${{ github.event_name }}" == "pull_request" ]]; then
51+ if [[ "${{ github.base_ref }}" == "master" ]]; then
52+ SUFFIX="-pr${{ github.event.number }}"
53+ else
54+ SUFFIX="-${{ github.base_ref }}-pr${{ github.event.number }}"
55+ fi
5256 fi
53- echo "DIST_SUFFIX=${{ matrix.configuration == 'Light' && '-Light' || '' }}${SUFFIX}" >> $GITHUB_ENV
57+ PACKAGE_SUFFIX="${{ matrix.configuration == 'Light' && '-Light' || '' }}${SUFFIX}"
58+ sed -i.bak "s/^PACKAGE_SUFFIX=\([-~]*[0-9a-zA-Z]*\)$/PACKAGE_SUFFIX=$PACKAGE_SUFFIX/g" VERSION.mk
59+ cat VERSION.mk
5460 - name : Install CPDK
5561 run : choco install windows-cryptographic-provider-development-kit -y > $null
5662 - name : Setup dev env
Original file line number Diff line number Diff line change @@ -64,6 +64,7 @@ ChangeLog
6464.cache
6565compile_commands.json
6666.dirstamp
67+ VERSION.mk.bak
6768
6869doc /tools /* -tool
6970doc /tools /eidenv
Original file line number Diff line number Diff line change @@ -18,7 +18,7 @@ MINIDRIVER_DEF = /DENABLE_MINIDRIVER
1818WIXFLAGS = -d ENABLE_MINIDRIVER $(WIXFLAGS )
1919
2020# Build MSI with the Windows Installer XML (WIX) toolkit
21- MSI_NAME = $(PRODUCT_NAME ) -$(PACKAGE_VERSION_MAJOR ) .$(PACKAGE_VERSION_MINOR ) .$(PACKAGE_VERSION_FIX ) _ $( PLATFORM )$( DIST_SUFFIX ) .msi
21+ MSI_NAME = $(PRODUCT_NAME ) -$(PACKAGE_VERSION_MAJOR ) .$(PACKAGE_VERSION_MINOR ) .$(PACKAGE_VERSION_FIX )$( PACKAGE_SUFFIX ) _ $( PLATFORM ) .msi
2222!IF "$(WIX_PACKAGES)" == ""
2323WIX_PACKAGES = $(TOPDIR ) \win32\packages
2424WIX_VERSION = 6.0.2
You can’t perform that action at this time.
0 commit comments