Skip to content

Commit

Permalink
ci(release-please): simplify bash_completion and configure.ac versioning
Browse files Browse the repository at this point in the history
  • Loading branch information
scop committed Feb 20, 2024
1 parent 7864377 commit e030f31
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 15 deletions.
6 changes: 5 additions & 1 deletion .github/release-please-config.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,9 @@
"include-v-in-tag": false
}
},
"pull-request-title-pattern": "chore: release${component} ${version}"
"pull-request-title-pattern": "chore: release${component} ${version}",
"extra-files": [
"bash_completion",
"configure.ac"
]
}
12 changes: 0 additions & 12 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -58,18 +58,6 @@ jobs:
manifest-file: .github/release-please-manifest.json
id: release
if: github.event_name == 'push' && matrix.dist == 'alpine'
- name: Do release preparations
run: |
version=$(cat version.txt)
sed -i -re "s/^(BASH_COMPLETION_VERSINFO=).*/\\1(${version//./ })/" bash_completion
sed -i -re "s/^(AC_INIT\(.*\[)[0-9.]+(\].*)/\\1$version\\2/" configure.ac
git config user.name $(git log -1 --format=format:%an)
git config user.email $(git log -1 --format=format:%ae)
git commit --message="chore: bump release in dist files" bash_completion configure.ac
git tag --force ${{steps.release.outputs.tag_name}}
git push
git push --tags --force
if: steps.release.outputs.release_created
# A "container" workflow config would be cleaner here, but comes with
# some restrictions/oddities: changes root's $HOME to /github/home
# without changing the actual home dir that can cause some problems,
Expand Down
6 changes: 5 additions & 1 deletion bash_completion
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,11 @@
#
# https://github.com/scop/bash-completion

BASH_COMPLETION_VERSINFO=(2 11 0)
BASH_COMPLETION_VERSINFO=(
2 # x-release-please-major
11 # x-release-please-minor
0 # x-release-please-patch
)

if [[ $- == *v* ]]; then
_comp__init_original_set_v="-v"
Expand Down
2 changes: 1 addition & 1 deletion configure.ac
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
AC_PREREQ([2.60])
AC_INIT([bash-completion], [2.11.0])
AC_INIT([bash-completion], [2.11.0]) dnl x-release-please-version
dnl tar-pax for portable UTF-8 handling
AM_INIT_AUTOMAKE([
foreign dist-xz no-dist-gzip tar-pax -Wall -Wno-portability -Werror
Expand Down

0 comments on commit e030f31

Please sign in to comment.