mirror of
https://cagebreak.project-repo.co/cagebreak.git
synced 2026-08-09 15:19:11 +02:00
Remove git hash from version
This commit is contained in:
parent
935cf11817
commit
c794d3519b
3 changed files with 6 additions and 13 deletions
|
|
@ -160,7 +160,7 @@ parse_args(struct cg_server *server, int argc, char *argv[]) {
|
|||
usage(stdout, argv[0]);
|
||||
return false;
|
||||
case 'v':
|
||||
fprintf(stdout, "Cagebreak version 1.0.6\n");
|
||||
fprintf(stdout, "Cagebreak version " CG_VERSION "\n");
|
||||
exit(0);
|
||||
default:
|
||||
usage(stderr, argv[0]);
|
||||
|
|
|
|||
16
meson.build
16
meson.build
|
|
@ -101,18 +101,10 @@ else
|
|||
have_xwayland = false
|
||||
endif
|
||||
|
||||
version = '@0@'.format(meson.project_version())
|
||||
git = find_program('git', native: true, required: false)
|
||||
if git.found()
|
||||
git_commit = run_command([git, 'rev-parse', '--short', 'HEAD'])
|
||||
git_branch = run_command([git, 'rev-parse', '--abbrev-ref', 'HEAD'])
|
||||
if git_commit.returncode() == 0 and git_branch.returncode() == 0
|
||||
version = '@0@-@1@ (branch \'@2@\')'.format(
|
||||
meson.project_version(),
|
||||
git_commit.stdout().strip(),
|
||||
git_branch.stdout().strip(),
|
||||
)
|
||||
endif
|
||||
if get_option('version_override') != ''
|
||||
version = '@0@'.format(get_option('version_override'))
|
||||
else
|
||||
version = '@0@'.format(meson.project_version())
|
||||
endif
|
||||
|
||||
conf_data = configuration_data()
|
||||
|
|
|
|||
|
|
@ -1,2 +1,3 @@
|
|||
option('xwayland', type: 'boolean', value: 'false', description: 'Enable support for X11 applications')
|
||||
option('fuzz', type: 'boolean', value: 'false', description: 'Enable building fuzzer targets')
|
||||
option('version_override', type: 'string', description: 'Set the project version to the string specified. Used for creating hashes for reproducible builds.')
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue