diff --git a/.github/workflows/makeRelease.yml b/.github/workflows/makeRelease.yml index 40e8ef21..269f5159 100644 --- a/.github/workflows/makeRelease.yml +++ b/.github/workflows/makeRelease.yml @@ -17,6 +17,10 @@ jobs: steps: - name: Pull code uses: actions/checkout@v4 + - name: Add repository to git safe directories + run: | + git config --global --add safe.directory $GITHUB_WORKSPACE + git config --global --add safe.directory /opt/code - name: Compile clib4 run: | cd /opt/code && \ @@ -37,6 +41,14 @@ jobs: asset_path: /opt/code/clib4-${{ github.event.release.tag_name }}.lha asset_name: clib4-${{ github.event.release.tag_name }}.lha asset_content_type: application/x-lzh-compressed + - name: Install gh binary + run: | + mkdir -p -m 755 /etc/apt/keyrings \ + && wget -qO- https://cli.github.com/packages/githubcli-archive-keyring.gpg | tee /etc/apt/keyrings/githubcli-archive-keyring.gpg > /dev/null \ + && chmod go+r /etc/apt/keyrings/githubcli-archive-keyring.gpg \ + && echo "deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/githubcli-archive-keyring.gpg] https://cli.github.com/packages stable main" | tee /etc/apt/sources.list.d/github-cli.list > /dev/null \ + && apt update \ + && apt install gh -y - name: Upload DEB release file in GitHub uses: actions/upload-release-asset@v1 env: @@ -59,6 +71,21 @@ jobs: rm /opt/amigarepo/ubuntu/pool/main/clib4*.deb after_script: | /root/regenerate-packages.sh + - name: Create Pull Request + id: cpr + uses: peter-evans/create-pull-request@v6 + with: + commit-message: Release ${{ github.event.release.tag_name }} changes + branch: release/${{ github.event.release.tag_name }} + base: master + body: Automated changes as part of the release + title: Version files changes by the github bot + - name: Enable Pull Request Automerge + if: steps.cpr.outputs.pull-request-operation == 'created' + uses: peter-evans/enable-pull-request-automerge@v3 + with: + pull-request-number: ${{ steps.cpr.outputs.pull-request-number }} + merge-method: squash # - name: Prepare OS4Depot release # run: | # mkdir os4depot-release diff --git a/.gitignore b/.gitignore index dc358ddb..a73ddaed 100755 --- a/.gitignore +++ b/.gitignore @@ -4,14 +4,17 @@ !libs/libauto.a *.lha *.bak +*.deb +*.map + /library/compiler.log -clib4.info compiler.log -*.map -.vscode -build/ +clib4.info clib4.lha -.idea/ -clib4_1.0_amd64 -*.deb -clib4/ \ No newline at end of file +clib4-*_amd64 + +build/ +clib4/ + +.idea +.vscode \ No newline at end of file diff --git a/GNUmakefile.os4 b/GNUmakefile.os4 index 1d64172f..24a6307b 100644 --- a/GNUmakefile.os4 +++ b/GNUmakefile.os4 @@ -165,6 +165,7 @@ ifneq ($(origin GITTAG),undefined) MAJOR = $(patsubst v%,%,$(firstword $(subst ., ,$(GITTAG)))) MINOR = $(word 2, $(subst ., ,$(GITTAG))) PATCH = $(word 3, $(subst ., ,$(GITTAG))) +GIT_HASH = $(shell git rev-parse --short HEAD) endif ############################################################################## @@ -253,10 +254,11 @@ gitver: $(VERBOSE)sed -i 's/[(]\([0-9]*\.[0-9]*\.[0-9]*\)[)]/($(DATESTR))/g' library/c.lib_rev.h $(VERBOSE)sed -i 's/"\([0-9]*\.[0-9]*\.[0-9]*\)"/"$(DATESTR)"/g' library/c.lib_rev.h ifdef GITTAG - $(VERBOSE)sed -i 's/VERSION\t*[[:digit:]]/VERSION\t\t\t$(MAJOR)/g' library/c.lib_rev.h - $(VERBOSE)sed -i 's/REVISION\t*[[:digit:]]/REVISION\t\t$(MINOR)/g' library/c.lib_rev.h - $(VERBOSE)sed -i 's/SUBREVISION\t*[[:digit:]]/SUBREVISION\t\t$(PATCH)/g' library/c.lib_rev.h + $(VERBOSE)sed -i 's/VERSION\t*[0-9]*/VERSION\t\t\t$(MAJOR)/g' library/c.lib_rev.h + $(VERBOSE)sed -i 's/REVISION\t*[0-9]*/REVISION\t\t$(MINOR)/g' library/c.lib_rev.h + $(VERBOSE)sed -i 's/SUBREVISION\t*[0-9]*/SUBREVISION\t\t$(PATCH)/g' library/c.lib_rev.h $(VERBOSE)sed -i 's/clib4.library [0-9]*\.[0-9]*\.[0-9]*/clib4.library $(MAJOR).$(MINOR).$(PATCH)/g' library/c.lib_rev.h + $(VERBOSE)sed -i 's/clib4.library [0-9]*\.[0-9]*\.[0-9]*-[a-z0-9]*/clib4.library $(MAJOR).$(MINOR).$(PATCH)-$(GIT_HASH)/g' library/c.lib_rev.h $(VERBOSE)sed -i 's/Version: [0-9]*\.[0-9]*\.[0-9]*/Version: $(MAJOR).$(MINOR).$(PATCH)/g' misc/control endif diff --git a/library/c.lib_rev.h b/library/c.lib_rev.h index b81c4291..f2fa3f12 100755 --- a/library/c.lib_rev.h +++ b/library/c.lib_rev.h @@ -1,8 +1,8 @@ #define VERSION 1 -#define REVISION 0 +#define REVISION 3 #define SUBREVISION 0 -#define DATE "28.05.2024" -#define VERS "clib4.library 1.0.0" -#define VSTRING "clib4.library 1.0.0 (28.05.2024)\r\n" -#define VERSTAG "\0$VER: clib4.library 1.0.0 (28.05.2024)" \ No newline at end of file +#define DATE "04.06.2024" +#define VERS "clib4.library 1.3.0" +#define VSTRING "clib4.library 1.3.0 (04.06.2024)\r\n" +#define VERSTAG "\0$VER: clib4.library 1.3.0-dummy (04.06.2024)" \ No newline at end of file diff --git a/misc/control b/misc/control index a7574687..23b28426 100644 --- a/misc/control +++ b/misc/control @@ -1,5 +1,5 @@ Package: amigaos4-clib4 -Version: 1.0.2 +Version: 1.3.0 Maintainer: Andrea Palmatè Architecture: amd64 Section: libdevel