Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

S3rj1k #200

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 10 additions & 10 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ concurrency:
jobs:
build_rpm:
name: 'Build RPM'
uses: signalwire/actions-template/.github/workflows/ci-rpm-packages.yml@main
uses: s3rj1k/actions-template/.github/workflows/ci-rpm-packages.yml@prebuild_script
with:
PROJECT_NAME: libks
RUNNER: ubuntu-latest
Expand All @@ -29,7 +29,7 @@ jobs:

build_deb:
name: 'Build DEB'
uses: signalwire/actions-template/.github/workflows/ci-deb-packages-v2.yml@main
uses: s3rj1k/actions-template/.github/workflows/ci-deb-packages-v2.yml@prebuild_script
strategy:
fail-fast: false
matrix:
Expand Down Expand Up @@ -60,7 +60,7 @@ jobs:
- rpm
platform:
- amd64
uses: signalwire/actions-template/.github/workflows/ci-libs-metadata-v2.yml@main
uses: s3rj1k/actions-template/.github/workflows/ci-libs-metadata-v2.yml@prebuild_script
with:
ARTIFACT_NAME: ${{ matrix.os }}-${{ matrix.platform }}-artifact
OS_PLATFORM: ${{ matrix.os }}-${{ matrix.platform }}
Expand All @@ -83,7 +83,7 @@ jobs:
platform:
- amd64
- armhf
uses: signalwire/actions-template/.github/workflows/ci-libs-metadata-v2.yml@main
uses: s3rj1k/actions-template/.github/workflows/ci-libs-metadata-v2.yml@prebuild_script
with:
ARTIFACT_NAME: ${{ matrix.os }}-${{ matrix.codename }}-${{ matrix.platform }}-artifact
OS_PLATFORM: ${{ matrix.os }}-${{ matrix.codename }}-${{ matrix.platform }}
Expand All @@ -101,7 +101,7 @@ jobs:
- rpm
platform:
- amd64
uses: signalwire/actions-template/.github/workflows/cd-scp.yml@main
uses: s3rj1k/actions-template/.github/workflows/cd-scp.yml@prebuild_script
with:
ARTIFACT_NAME: ${{ matrix.os }}-${{ matrix.platform }}-artifact
TARGET_FOLDER: /var/www/libks-${{ github.ref_name }}-${{ matrix.os }}-${{ matrix.platform }}/${{ github.run_id }}-${{ github.run_number }}
Expand Down Expand Up @@ -132,7 +132,7 @@ jobs:
platform:
- amd64
- armhf
uses: signalwire/actions-template/.github/workflows/cd-scp.yml@main
uses: s3rj1k/actions-template/.github/workflows/cd-scp.yml@prebuild_script
with:
ARTIFACT_NAME: ${{ matrix.os }}-${{ matrix.codename }}-${{ matrix.platform }}-artifact
TARGET_FOLDER: /var/www/libks-${{ github.ref_name }}-${{ matrix.os }}-${{ matrix.platform }}/${{ github.run_id }}-${{ github.run_number }}
Expand All @@ -158,7 +158,7 @@ jobs:
- rpm
platform:
- amd64
uses: signalwire/actions-template/.github/workflows/cd-libs-metadata.yml@main
uses: s3rj1k/actions-template/.github/workflows/cd-libs-metadata.yml@prebuild_script
with:
ARTIFACT_NAME: ${{ matrix.os }}-${{ matrix.platform }}-meta
LIB_NAME: libks
Expand Down Expand Up @@ -191,7 +191,7 @@ jobs:
platform:
- amd64
- armhf
uses: signalwire/actions-template/.github/workflows/cd-libs-metadata.yml@main
uses: s3rj1k/actions-template/.github/workflows/cd-libs-metadata.yml@prebuild_script
with:
ARTIFACT_NAME: ${{ matrix.os }}-${{ matrix.codename }}-${{ matrix.platform }}-meta
LIB_NAME: libks
Expand All @@ -211,7 +211,7 @@ jobs:
permissions: write-all
name: 'Copy hash to remote RPM'
needs: [ distribute_meta_rpm ]
uses: signalwire/actions-template/.github/workflows/cd-scp.yml@main
uses: s3rj1k/actions-template/.github/workflows/cd-scp.yml@prebuild_script
strategy:
matrix:
os:
Expand All @@ -233,7 +233,7 @@ jobs:
permissions: write-all
name: 'Copy hash to remote DEB'
needs: [ distribute_meta_deb ]
uses: signalwire/actions-template/.github/workflows/cd-scp.yml@main
uses: s3rj1k/actions-template/.github/workflows/cd-scp.yml@prebuild_script
strategy:
matrix:
os:
Expand Down
14 changes: 8 additions & 6 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -260,23 +260,24 @@ if("${CMAKE_OS_NAME}" STREQUAL "Debian")
set(CHANGELOG_FOOTER " -- ${CPACK_DEBIAN_PACKAGE_MAINTAINER} ${RFC2822_TIMESTAMP}")
endif()

# Set version release from environment variable
# Guess version release from environment variable
# (usage of CPACK_DEBIAN_PACKAGE_RELEASE breaks ability to set CPACK_DEBIAN_PACKAGE_VERSION properly)
if (NOT "$ENV{PACKAGE_RELEASE}" STREQUAL "")
set(CPACK_DEBIAN_PACKAGE_RELEASE "$ENV{PACKAGE_RELEASE}")
set(PACKAGE_RELEASE "$ENV{PACKAGE_RELEASE}")
else()
if(DATE_CMD)
execute_process(COMMAND ${DATE_CMD} +%Y%m%d OUTPUT_VARIABLE DATE_YMD)
set(CPACK_DEBIAN_PACKAGE_RELEASE ${DATE_YMD})
set(PACKAGE_RELEASE ${DATE_YMD})
else()
set(CPACK_DEBIAN_PACKAGE_RELEASE "1")
set(PACKAGE_RELEASE "1")
endif()
endif()

# Set package version
set(CPACK_DEBIAN_PACKAGE_VERSION ${PROJECT_VERSION}-${CPACK_DEBIAN_PACKAGE_RELEASE}~${DISTRO_CODENAME})
set(CPACK_DEBIAN_PACKAGE_VERSION ${PROJECT_VERSION}-${PACKAGE_RELEASE}~${DISTRO_CODENAME})

# Set debian file name format
set(CPACK_DEBIAN_FILE_NAME "${PACKAGE_NAME}_${PROJECT_VERSION}-${CPACK_DEBIAN_PACKAGE_RELEASE}_${DISTRO_CODENAME}_${CPACK_DEBIAN_PACKAGE_ARCHITECTURE}.deb")
set(CPACK_DEBIAN_FILE_NAME "${PACKAGE_NAME}_${PROJECT_VERSION}-${PACKAGE_RELEASE}_${DISTRO_CODENAME}_${CPACK_DEBIAN_PACKAGE_ARCHITECTURE}.deb")

# Set a Debian compliant changelog header
set(CHANGELOG_HEADER "libks (${CPACK_DEBIAN_PACKAGE_VERSION}) ${DISTRO_CODENAME}\; urgency=${CPACK_DEBIAN_PACKAGE_PRIORITY}")
Expand Down Expand Up @@ -328,6 +329,7 @@ if("${CMAKE_OS_NAME}" STREQUAL "Debian")
else()
message(WARNING "DEB Generator: Can't find git and/or gzip and/or date in your path. DEB packages will be missing changelog.Debian.gz.")
endif()

endif()

# Enable packaging module
Expand Down
Loading