diff options
author | Martin Nordholts <enselic@gmail.com> | 2021-01-09 20:53:54 +0100 |
---|---|---|
committer | David Peter <sharkdp@users.noreply.github.com> | 2021-01-10 10:56:15 +0100 |
commit | 9a3a5545e70d10f62d645e5f553b75ae13feb755 (patch) | |
tree | 79654c1af9a933a4c8bbb9462670d7eef0d7ddf4 | |
parent | 43919066ad3cb12acb62d78758d50624ae297f5d (diff) |
CICD: Build: Use Cargo.toml version instead of tag
This enables us to later always build Debian packages. If you try to use
a git sha as Debian package version you will get an error:
dpkg-deb: error: parsing file '_staging/dpkg/DEBIAN/control' near line 2 package 'bat':
error in 'Version' field string 'd2963ce4': version number does not start with digit
so we need to use a version that is always available.
We duplicate the bat version in another place here which is a bit bad,
but it is already duplicated a lot, so we don't make things
significantly worse. It is still kind of nice to not have to figure out
a good and robust way to parse out the version from Cargo.toml in the CI
script.
For #1474
-rw-r--r-- | .github/workflows/CICD.yml | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/.github/workflows/CICD.yml b/.github/workflows/CICD.yml index 591b6258..d4c29cdd 100644 --- a/.github/workflows/CICD.yml +++ b/.github/workflows/CICD.yml @@ -2,6 +2,7 @@ name: CICD env: PROJECT_NAME: bat + PROJECT_VERSION: "0.17.1" PROJECT_DESC: "A `cat` clone with wings" PROJECT_MAINTAINER: "David Peter <mail@david-peter.de>" PROJECT_HOMEPAGE: "https://github.com/sharkdp/bat" @@ -116,10 +117,9 @@ jobs: echo ::set-output name=EXE_suffix::${EXE_suffix} # parse commit reference info unset REF_TAG ; case ${GITHUB_REF} in refs/tags/*) REF_TAG=${GITHUB_REF#refs/tags/} ;; esac; - REF_SHAS=${GITHUB_SHA:0:8} # package name PKG_suffix=".tar.gz" ; case ${{ matrix.job.target }} in *-pc-windows-*) PKG_suffix=".zip" ;; esac; - PKG_BASENAME=${PROJECT_NAME}-${REF_TAG:-$REF_SHAS}-${{ matrix.job.target }} + PKG_BASENAME=${PROJECT_NAME}-v${PROJECT_VERSION}-${{ matrix.job.target }} PKG_NAME=${PKG_BASENAME}${PKG_suffix} echo ::set-output name=PKG_BASENAME::${PKG_BASENAME} echo ::set-output name=PKG_NAME::${PKG_NAME} |