Skip to content

Commit

Permalink
Merge pull request #201 from walkero-gr/update-version-in-repo-after-…
Browse files Browse the repository at this point in the history
…a-release

Update version in repo after a release
  • Loading branch information
afxgroup authored Aug 18, 2024
2 parents 90c4621 + f1fa673 commit ba506bb
Show file tree
Hide file tree
Showing 5 changed files with 49 additions and 17 deletions.
27 changes: 27 additions & 0 deletions .github/workflows/makeRelease.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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 && \
Expand All @@ -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:
Expand All @@ -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
Expand Down
19 changes: 11 additions & 8 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -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/
clib4-*_amd64

build/
clib4/

.idea
.vscode
8 changes: 5 additions & 3 deletions GNUmakefile.os4
Original file line number Diff line number Diff line change
Expand Up @@ -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

##############################################################################
Expand Down Expand Up @@ -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

Expand Down
10 changes: 5 additions & 5 deletions library/c.lib_rev.h
Original file line number Diff line number Diff line change
@@ -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)"
#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)"
2 changes: 1 addition & 1 deletion misc/control
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
Package: amigaos4-clib4
Version: 1.0.2
Version: 1.3.0
Maintainer: Andrea Palmatè <[email protected]>
Architecture: amd64
Section: libdevel
Expand Down

0 comments on commit ba506bb

Please sign in to comment.