From 7cb880682ad8d7d4d7a8e03b078072ad3132a921 Mon Sep 17 00:00:00 2001 From: Kien Nguyen Date: Wed, 21 Dec 2022 17:59:26 +0900 Subject: [PATCH] ci: Auto pickup Emacs major version --- .github/workflows/build.yml | 3 ++- emacs-build.sh | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index af106bb..46c8316 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -52,10 +52,11 @@ jobs: cd ./git/emacs/ git clone --depth 1 $EMACS_REPO . echo "EMACS_COMMIT=`date +'%Y%m%d'`.`git rev-parse --short=7 HEAD`" >> $GITHUB_ENV + echo "EMACS_MAJOR_VER=`cat configure.ac | grep -Po 'AC_INIT\(.*\[\K\d+'`" >> $GITHUB_ENV - name: Set package version run: | - echo "EMACS_VER=29.${{ github.run_number }}.${{ env.EMACS_COMMIT }}" >> $GITHUB_ENV + echo "EMACS_VER=${{ env.EMACS_MAJOR_VER }}.${{ github.run_number }}.${{ env.EMACS_COMMIT }}" >> $GITHUB_ENV shell: bash - name: Build and pack Emacs diff --git a/emacs-build.sh b/emacs-build.sh index 207b51f..35198b7 100644 --- a/emacs-build.sh +++ b/emacs-build.sh @@ -184,6 +184,7 @@ function action0_clone () if test $GITHUB_ENV; then echo "EMACS_COMMIT=`git_version $emacs_source_dir`" >> $GITHUB_ENV + echo "EMACS_MAJOR_VER=`cat $emacs_source_dir/configure.ac | grep -Po 'AC_INIT\(.*\[\K\d+'`" >> $GITHUB_ENV fi }