Rename git version to simply version

This commit is contained in:
Martin Lund 2024-11-30 11:37:12 +01:00
parent c49faa7337
commit b8135ea639
6 changed files with 15 additions and 15 deletions

View file

@ -1,3 +0,0 @@
#pragma once
#define GIT_VERSION "@GIT_VERSION@"

View file

@ -22,7 +22,7 @@
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include "git-version.h"
#include "version.h"
#include "config.h"
#include "options.h"
#include "configfile.h"
@ -102,7 +102,7 @@ int main(int argc, char *argv[])
error_enter_session_mode();
/* Print launch hints */
tio_printf("tio %s", GIT_VERSION);
tio_printf("tio %s", VERSION);
if (interactive_mode)
{
tio_printf("Press ctrl-%c q to quit", option.prefix_key);

View file

@ -1,8 +1,8 @@
# Generate git version header
git_version_h = vcs_tag(command : ['git', 'describe', '--tags', '--always', '--dirty'],
input : 'git-version.h.in',
output :'git-version.h',
replace_string:'@GIT_VERSION@')
# Generate version header
version_h = vcs_tag(command : ['git', 'describe', '--tags', '--always', '--dirty'],
input : 'version.h.in',
output :'version.h',
replace_string:'@VERSION@')
config_h = configuration_data()
config_h.set('BAUDRATE_CASES', baudrate_cases)
@ -27,7 +27,7 @@ tio_sources = [
'script.c',
'fs.c',
'readline.c',
git_version_h
version_h
]

View file

@ -25,7 +25,7 @@
#include <regex.h>
#include <getopt.h>
#include <errno.h>
#include "git-version.h"
#include "version.h"
#include "config.h"
#include "misc.h"
#include "print.h"
@ -1088,7 +1088,7 @@ void options_parse(int argc, char *argv[])
break;
case 'v':
printf("tio %s\n", GIT_VERSION);
printf("tio %s\n", VERSION);
exit(EXIT_SUCCESS);
break;

View file

@ -22,7 +22,7 @@
#if defined(__linux__)
#include <linux/serial.h>
#endif
#include "git-version.h"
#include "version.h"
#include "config.h"
#include <stdarg.h>
#include <stdio.h>
@ -1091,7 +1091,7 @@ void handle_command_sequence(char input_char, char *output_char, bool *forward)
break;
case KEY_V:
tio_printf("tio %s", GIT_VERSION);
tio_printf("tio %s", VERSION);
break;
case KEY_X:

3
src/version.h.in Normal file
View file

@ -0,0 +1,3 @@
#pragma once
#define VERSION "@VERSION@"