mirror of
https://cagebreak.project-repo.co/cagebreak.git
synced 2026-08-24 06:24:19 +02:00
Add set-ver script
This commit is contained in:
parent
47a2415022
commit
47e9f28019
3 changed files with 36 additions and 0 deletions
13
README.md
13
README.md
|
|
@ -361,6 +361,19 @@ Withou meson use:
|
|||
./scripts/create-signatures GPGID
|
||||
```
|
||||
|
||||
##### Set Version Number
|
||||
|
||||
Once the version number is set within meson.build, you can use
|
||||
|
||||
```
|
||||
meson compile set-ver -C build
|
||||
```
|
||||
|
||||
to set the version number in the man pages and README repology minversion.
|
||||
|
||||
Use of the script without meson is discouraged because meson.build is
|
||||
not touched by the script.
|
||||
|
||||
### GCC and -fanalyzer
|
||||
|
||||
Cagebreak should compile with any reasonably new gcc or clang. Consider
|
||||
|
|
|
|||
|
|
@ -362,6 +362,9 @@ run_target('output-hashes',
|
|||
run_target('create-sigs',
|
||||
command : ['scripts/create-signatures', get_option('gpg_id')])
|
||||
|
||||
run_target('set-ver',
|
||||
command : ['scripts/set-version', meson.project_version()])
|
||||
|
||||
# Test Suite
|
||||
|
||||
test('Build without warnings', find_program('test/build-w-o-warnings'), env : [ ''.join('MESONCURRENTCONFIGDIR=', meson.current_source_dir()) ], suite: 'devel')
|
||||
|
|
|
|||
20
scripts/set-version
Executable file
20
scripts/set-version
Executable file
|
|
@ -0,0 +1,20 @@
|
|||
#!/bin/bash
|
||||
# Copyright 2023, project-repo and the cagebreak contributors
|
||||
# SPDX-License-Identifier: MIT
|
||||
|
||||
# TODO man pages
|
||||
|
||||
if [[ -n ${MESON_SOURCE_ROOT} ]]
|
||||
then
|
||||
# shellcheck disable=2164
|
||||
cd "${MESON_SOURCE_ROOT}"
|
||||
fi
|
||||
|
||||
# shellcheck disable=2034
|
||||
version="${1}"
|
||||
sed -i -e "s/minversion\=[0-9]*\.[0-9]*.[0-9]*/minversion=$version/" README.md
|
||||
|
||||
|
||||
sed -i -e "s/Version [0-9]*\.[0-9]*.[0-9]*/VERSION $version/" man/cagebreak.1.md
|
||||
sed -i -e "s/Version [0-9]*\.[0-9]*.[0-9]*/VERSION $version/" man/cagebreak-config.5.md
|
||||
sed -i -e "s/Version [0-9]*\.[0-9]*.[0-9]*/VERSION $version/" man/cagebreak-socket.7.md
|
||||
Loading…
Add table
Add a link
Reference in a new issue