diff --git a/.github/workflows/apt.yml b/.github/workflows/apt.yml index 7525cb82..87d8a58b 100644 --- a/.github/workflows/apt.yml +++ b/.github/workflows/apt.yml @@ -27,11 +27,13 @@ jobs: with: submodules: true - - name: Extract major.minor.patch from file .version + - name: Generate environment variables run: | tr -d '\n' < .version > temp && mv temp .version - VERSION=$(tr -d '\n' < .version) - echo "MAJOR_MINOR_PATCH=$(echo "${VERSION%.*}.$((${VERSION##*.}))")" >> $GITHUB_ENV + VERSION=$(cat .version) + echo VERSION=${VERSION} >> $GITHUB_ENV + echo STANDARDS_VERSION=$(echo ${VERSION%+*}) >> $GITHUB_ENV + echo DISTRIBUTION=$(echo ${{ matrix.distribution }} | tr '[:upper:]' '[:lower:]') >> $GITHUB_ENV - name: Build package shell: bash @@ -40,13 +42,13 @@ jobs: docker run --rm \ -v "${GITHUB_WORKSPACE}/deploy:/deploy" \ -v "${GITHUB_WORKSPACE}:/source:rw" \ - ghcr.io/hyperion-project/${{ matrix.architecture }}:$(echo ${{ matrix.distribution }} | tr '[:upper:]' '[:lower:]') \ + ghcr.io/hyperion-project/${{ matrix.architecture }}:${{ env.DISTRIBUTION }} \ /bin/bash -c "cd /source && \ - mkdir -p debian/source && echo '3.0 (quilt)' > debian/source/format && \ - dch --create --distribution $(echo ${{ matrix.distribution }} | tr '[:upper:]' '[:lower:]') --package 'hyperion' -v '$(cat .version)~$(echo ${{ matrix.distribution }} | tr '[:upper:]' '[:lower:]')' '${{ github.event.commits[0].message }}' && \ + mkdir -p debian/source && echo '3.0 (native)' > debian/source/format && \ + dch --create --distribution ${{ env.DISTRIBUTION }} --package 'hyperion' -v '${{ env.VERSION }}~${{ env.DISTRIBUTION }}' '${{ github.event.commits[0].message }}' && \ cp -fr LICENSE debian/copyright && \ - sed 's/@BUILD_DEPENDS@/${{ matrix.build-depends }}/g; s/@DEPENDS@/${{ matrix.package-depends }}/g; s/@ARCHITECTURE@/${{ matrix.architecture }}/g; s/@STANDARDS_VERSION@/${{ env.MAJOR_MINOR_PATCH }}/g' debian/control.in > debian/control && \ - tar -cJf ../hyperion_$(cat .version)~$(echo ${{ matrix.distribution }} | tr '[:upper:]' '[:lower:]').orig.tar.xz . && \ + sed 's/@BUILD_DEPENDS@/${{ matrix.build-depends }}/g; s/@DEPENDS@/${{ matrix.package-depends }}/g; s/@ARCHITECTURE@/${{ matrix.architecture }}/g; s/@STANDARDS_VERSION@/${{ env.STANDARDS_VERSION }}/g' debian/control.in > debian/control && \ + tar -cJf ../hyperion_${{ env.VERSION }}~${{ env.DISTRIBUTION }}.orig.tar.xz . && \ debuild --no-lintian -uc -us && \ cp ../hyperion_* /deploy" diff --git a/.github/workflows/nightly.yml b/.github/workflows/nightly.yml index 163be718..e4c13474 100644 --- a/.github/workflows/nightly.yml +++ b/.github/workflows/nightly.yml @@ -50,12 +50,13 @@ jobs: with: submodules: true - - name: Generate nightly version - id: vars + - name: Generate environment variables run: | - VERSION="$(tr -d '\n' < .version)+nightly$(date '+%Y%m%d')$(git rev-parse --short HEAD)" - echo "MAJOR_MINOR_PATCH=$(echo "${VERSION%.*}.$((${VERSION##*.}))")" >> $GITHUB_ENV - echo "$VERSION" > .version + echo "$(tr -d '\n' < .version)+nightly$(date '+%Y%m%d')$(git rev-parse --short HEAD)" > .version + VERSION=$(cat .version) + echo VERSION=${VERSION} >> $GITHUB_ENV + echo STANDARDS_VERSION=$(echo ${VERSION%+*}) >> $GITHUB_ENV + echo DISTRIBUTION=$(echo ${{ matrix.distribution }} | tr '[:upper:]' '[:lower:]') >> $GITHUB_ENV - name: Build package shell: bash @@ -64,13 +65,13 @@ jobs: docker run --rm \ -v "${GITHUB_WORKSPACE}/deploy:/deploy" \ -v "${GITHUB_WORKSPACE}:/source:rw" \ - ghcr.io/hyperion-project/${{ matrix.architecture }}:$(echo ${{ matrix.distribution }} | tr '[:upper:]' '[:lower:]') \ + ghcr.io/hyperion-project/${{ matrix.architecture }}:${{ env.DISTRIBUTION }} \ /bin/bash -c "cd /source && \ - mkdir -p debian/source && echo '3.0 (quilt)' > debian/source/format && \ - dch --create --distribution $(echo ${{ matrix.distribution }} | tr '[:upper:]' '[:lower:]') --package 'hyperion' -v '$(cat .version)~$(echo ${{ matrix.distribution }} | tr '[:upper:]' '[:lower:]')' '${{ github.event.commits[0].message }}' && \ + mkdir -p debian/source && echo '3.0 (native)' > debian/source/format && \ + dch --create --distribution ${{ env.DISTRIBUTION }} --package 'hyperion' -v '${{ env.VERSION }}~${{ env.DISTRIBUTION }}' '${{ github.event.commits[0].message }}' && \ cp -fr LICENSE debian/copyright && \ - sed 's/@BUILD_DEPENDS@/${{ matrix.build-depends }}/g; s/@DEPENDS@/${{ matrix.package-depends }}/g; s/@ARCHITECTURE@/${{ matrix.architecture }}/g; s/@STANDARDS_VERSION@/${{ env.MAJOR_MINOR_PATCH }}/g' debian/control.in > debian/control && \ - tar -cJf ../hyperion_$(cat .version)~$(echo ${{ matrix.distribution }} | tr '[:upper:]' '[:lower:]').orig.tar.xz . && \ + sed 's/@BUILD_DEPENDS@/${{ matrix.build-depends }}/g; s/@DEPENDS@/${{ matrix.package-depends }}/g; s/@ARCHITECTURE@/${{ matrix.architecture }}/g; s/@STANDARDS_VERSION@/${{ env.STANDARDS_VERSION }}/g' debian/control.in > debian/control && \ + tar -cJf ../hyperion_${{ env.VERSION }}~${{ env.DISTRIBUTION }}.orig.tar.xz . && \ debuild --no-lintian -uc -us && \ cp ../hyperion_* /deploy" @@ -121,7 +122,7 @@ jobs: fi done - - name: Upload packages to APT server (Nightly) + - name: Upload packages to nightly server uses: SamKirkland/FTP-Deploy-Action@4.1.0 with: server: nightly.hyperion-project.org diff --git a/.github/workflows/push-master.yml b/.github/workflows/push-master.yml index 3a5cdbeb..4521d9b2 100644 --- a/.github/workflows/push-master.yml +++ b/.github/workflows/push-master.yml @@ -175,12 +175,6 @@ jobs: run: | echo "TAG=${GITHUB_REF/refs\/tags\//}" >> $GITHUB_ENV echo "VERSION=$(tr -d '\n' < .version)" >> $GITHUB_ENV - echo "preRelease=false" >> $GITHUB_ENV - - # If version contains alpha or beta, mark draft release as pre-release - - name: Mark release as pre-release - if: contains(env.VERSION, 'alpha') || contains(env.VERSION, 'beta') - run: echo "preRelease=true" >> $GITHUB_ENV # Download artifacts from previous build process - name: Download artifacts @@ -196,7 +190,6 @@ jobs: tag_name: ${{ env.TAG }} files: "artifacts/**" draft: true - prerelease: ${{ env.preRelease }} env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/.version b/.version index f252cb58..3bad7881 100644 --- a/.version +++ b/.version @@ -1 +1 @@ -2.0.0-alpha.11 +2.0.12 \ No newline at end of file diff --git a/cmake/version.cmake b/cmake/version.cmake index d6ed19b1..5d03370b 100644 --- a/cmake/version.cmake +++ b/cmake/version.cmake @@ -10,7 +10,7 @@ function(SetVersionNumber PREFIX VERSION_STRING) LIST( GET VERSION_PARTS 1 VERSION_MINOR ) endif() - if(${VERSION_LEN} GREATER 3) + if(${VERSION_LEN} GREATER 2) LIST( GET VERSION_PARTS 2 VERSION_PATCH ) endif()