Skip to content

Commit

Permalink
Merge pull request #5 from hatelamers/feature/2_workflow_update
Browse files Browse the repository at this point in the history
#2 updated publish workflow, fixed minor errors in CMake scripts
  • Loading branch information
hatelamers authored Nov 14, 2024
2 parents 3a3177c + 58a3f00 commit dd58c6c
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 7 deletions.
5 changes: 2 additions & 3 deletions .github/workflows/cmake-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ jobs:
env:
CODESIGN_PW: ${{ secrets.CODESIGN_PW }}
- name: Publish to GitHub
uses: softprops/action-gh-release@v1
uses: softprops/action-gh-release@v2
with:
files: |
distr/*.exe
Expand All @@ -57,5 +57,4 @@ jobs:
if: always()
continue-on-error: true
run: |
del /q "$env:TEMP\signcert.txt" 2>nul
del /q "$env:TEMP\signcert.pfx" 2>nul
del "$env:TEMP\signcert.*"
2 changes: 1 addition & 1 deletion buildenv/Product.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,5 @@ set(PRODUCT_HOMEPAGE_URL "https://github.com/hatelamers/WinPinMenu")
set(PROJECT_LICENSE "GNU/GPL")
set(PROJECT_LICENSE_URL "https://www.gnu.org/licenses/gpl-3.0.en.html")
set(PROJECT_COPYRIGHT "© 2024, some rights reserved")
string(TOLOWER "${PROJECT_NAME}" PRODUCT_IDENTIFIER)
string(TOLOWER "${PRODUCT_NAME}" PRODUCT_IDENTIFIER)
set(PACKAGE_IDENTIFIER "net.jasics.${PRODUCT_IDENTIFIER}")
6 changes: 3 additions & 3 deletions buildenv/cmake/PostBuild.cmake
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
if(NOT ${BUILD_TYPE} MATCHES Debug)
include("${SOURCE_DIR}/Product.cmake")
file(READ "${SOURCE_DIR}/buildnumber.txt" BUILD_NUMBER)
if(NOT ${BUILD_NUMBER})
set(BUILD_NUMBER 1)
endif()
include("${SOURCE_DIR}/Product.cmake")
file(REMOVE "${MAIN_TARGET_SOURCE_DIR}/productmeta.h")
configure_file("${MAIN_TARGET_SOURCE_DIR}/productmeta.h.in" "${MAIN_TARGET_SOURCE_DIR}/productmeta.h")

math(EXPR BUILD_NUMBER "${BUILD_NUMBER} + 1")
if(${CMAKE_VERSION} VERSION_LESS 3.18)
file(WRITE "${SOURCE_DIR}/buildnumber.txt" "${BUILD_NUMBER}")
else()
file(CONFIGURE OUTPUT "${SOURCE_DIR}/buildnumber.txt" CONTENT "${BUILD_NUMBER}")
endif()
file(REMOVE "${MAIN_TARGET_SOURCE_DIR}/productmeta.h")
configure_file("${MAIN_TARGET_SOURCE_DIR}/productmeta.h.in" "${MAIN_TARGET_SOURCE_DIR}/productmeta.h")
file(TOUCH_NOCREATE "${MAIN_TARGET_SOURCE_DIR}/${MAIN_TARGET_NAME}.rc")

message(STATUS "Build number set to ${BUILD_NUMBER} in ${SOURCE_DIR}/buildnumber.txt")
Expand Down

0 comments on commit dd58c6c

Please sign in to comment.