summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRyo Nakamura <upa@haeena.net>2023-03-12 23:01:06 +0900
committerRyo Nakamura <upa@haeena.net>2023-03-12 23:01:06 +0900
commit6e17d0ddbc61d60e5af4e855411b8ed57994dd45 (patch)
treec03f901a12426655cd34efc329f7cedf3a3e74ae
parente2da5811ce2c9006ecb4319d8b1c40128ac2ff67 (diff)
remove VERSION from package file names
This change enables downloading latest packages from URL https://github.com/upa/mscp/releases/latest/download/PACKAGE
-rw-r--r--.github/workflows/release.yml19
-rw-r--r--CMakeLists.txt4
-rw-r--r--docker/alpine-3.17.Dockerfile3
3 files changed, 12 insertions, 14 deletions
diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml
index ad1f66f..266ab30 100644
--- a/.github/workflows/release.yml
+++ b/.github/workflows/release.yml
@@ -24,11 +24,6 @@ jobs:
- name: install build dependency
run: sudo ./scripts/install-build-deps.sh
- - name: Set variables
- run: |
- VER=$(cat VERSION)
- echo "VERSION=$VER" >> $GITHUB_ENV
-
- name: Configure Cmake
run: cmake -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}}
@@ -41,15 +36,19 @@ jobs:
- name: Retrieve packages from containers
run: make -C ${{github.workspace}}/build docker-pkg-all
+ - name: Copy mscp single binary built inside Alpine
+ run: cp ${{github.workspace}}/build/mscp_alpine-3.17-x86_64.static ${{github.workspace}}/build/mscp.linux.x86.static
+
- name: Release
uses: softprops/action-gh-release@v1
with:
files: |
- ${{github.workspace}}/build/mscp_${{env.VERSION}}-ubuntu-20.04-x86_64.deb
- ${{github.workspace}}/build/mscp_${{env.VERSION}}-ubuntu-22.04-x86_64.deb
- ${{github.workspace}}/build/mscp_${{env.VERSION}}-centos-8-x86_64.rpm
- ${{github.workspace}}/build/mscp_${{env.VERSION}}-rocky-8.6-x86_64.rpm
- ${{github.workspace}}/build/mscp_${{env.VERSION}}-apline-3.17-x86_64.static
+ ${{github.workspace}}/build/mscp_ubuntu-20.04-x86_64.deb
+ ${{github.workspace}}/build/mscp_ubuntu-22.04-x86_64.deb
+ ${{github.workspace}}/build/mscp_centos-8-x86_64.rpm
+ ${{github.workspace}}/build/mscp_rocky-8.6-x86_64.rpm
+ ${{github.workspace}}/build/mscp_alpine-3.17-x86_64.static
+ ${{github.workspace}}/build/mscp.linux.x86.static
source-release:
runs-on: ubuntu-latest
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 4a344a0..c3b3c26 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -143,7 +143,7 @@ if(UNIX AND NOT APPLE) # on linux
OUTPUT_VARIABLE DIST_DEP OUTPUT_STRIP_TRAILING_WHITESPACE)
set(PACKAGE_FILE_NAME
- ${PROJECT_NAME}_${PROJECT_VERSION}-${DIST_NAME}-${DIST_VER}-${ARCH})
+ ${PROJECT_NAME}_${DIST_NAME}-${DIST_VER}-${ARCH})
set(CPACK_DEBIAN_FILE_NAME ${PACKAGE_FILE_NAME}.deb)
set(CPACK_DEBIAN_PACKAGE_DEPENDS ${DIST_DEP})
@@ -177,7 +177,7 @@ foreach(x RANGE ${DIST_LISTLEN})
set(DOCKER_IMAGE mscp-${DIST_NAME}:${DIST_VER})
set(DOCKER_INDEX ${DIST_NAME}-${DIST_VER})
set(PKG_FILE_NAME
- mscp_${PROJECT_VERSION}-${DIST_NAME}-${DIST_VER}-${ARCH}.${DIST_PKG})
+ mscp_${DIST_NAME}-${DIST_VER}-${ARCH}.${DIST_PKG})
add_custom_target(docker-build-${DOCKER_INDEX}
COMMENT "Build mscp in ${DOCKER_IMAGE} container"
diff --git a/docker/alpine-3.17.Dockerfile b/docker/alpine-3.17.Dockerfile
index d2c899b..a49d0ee 100644
--- a/docker/alpine-3.17.Dockerfile
+++ b/docker/alpine-3.17.Dockerfile
@@ -24,8 +24,7 @@ RUN cd ${mscpdir} \
-DBUILD_CONAN=ON -DBUILD_STATIC=ON \
&& make \
&& cp mscp /usr/bin/ \
- && cp mscp /mscp/build/mscp_$(cat ${mscpdir}/VERSION)-alpine-3.17-x86_64.static \
- && cp mscp /mscp/build/mscp.linux.x86.static
+ && cp mscp /mscp/build/mscp_alpine-3.17-x86_64.static
# copy mscp to PKG FILE NAME because this build doesn't use CPACK