Browse Source

ci: Auto pickup Emacs major version

main
Kien Nguyen 2 years ago
parent
commit
7cb880682a
  1. 3
      .github/workflows/build.yml
  2. 1
      emacs-build.sh

3
.github/workflows/build.yml

@ -52,10 +52,11 @@ jobs:
cd ./git/emacs/ cd ./git/emacs/
git clone --depth 1 $EMACS_REPO . git clone --depth 1 $EMACS_REPO .
echo "EMACS_COMMIT=`date +'%Y%m%d'`.`git rev-parse --short=7 HEAD`" >> $GITHUB_ENV 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 - name: Set package version
run: | 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 shell: bash
- name: Build and pack Emacs - name: Build and pack Emacs

1
emacs-build.sh

@ -184,6 +184,7 @@ function action0_clone ()
if test $GITHUB_ENV; then if test $GITHUB_ENV; then
echo "EMACS_COMMIT=`git_version $emacs_source_dir`" >> $GITHUB_ENV 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 fi
} }

Loading…
Cancel
Save