Changed version number to git hash
This commit is contained in:
@@ -11,6 +11,8 @@ if [ $arg = "clean" ]; then
|
|||||||
exit
|
exit
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
version=$(git rev-parse HEAD)
|
||||||
|
|
||||||
oflag="-Og"
|
oflag="-Og"
|
||||||
debug_flag="-ggdb"
|
debug_flag="-ggdb"
|
||||||
|
|
||||||
@@ -20,7 +22,8 @@ if [ $arg = "release" ]; then
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
src="src/*.c"
|
src="src/*.c"
|
||||||
flags="-std=c23 $oflag $debug_flag -Wall -Wextra -Werror -Wpedantic -pedantic-errors"
|
macros="-DVERSION=\"$version\""
|
||||||
|
flags="-std=c23 $oflag $debug_flag $macros -Wall -Wextra -Werror -Wpedantic -pedantic-errors"
|
||||||
includes="-I src/headers"
|
includes="-I src/headers"
|
||||||
|
|
||||||
cmd="gcc $flags $includes $src -o target/sanke"
|
cmd="gcc $flags $includes $src -o target/sanke"
|
||||||
|
|||||||
@@ -4,10 +4,8 @@
|
|||||||
|
|
||||||
#include "args.h"
|
#include "args.h"
|
||||||
|
|
||||||
extern char* version;
|
|
||||||
|
|
||||||
static void handle_version() {
|
static void handle_version() {
|
||||||
printf("Sanke version %s\n", version);
|
printf("Sanke version %s\n", VERSION);
|
||||||
exit(0);
|
exit(0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -15,8 +15,6 @@
|
|||||||
#define TERMIOS 1
|
#define TERMIOS 1
|
||||||
#define DEBUG 0
|
#define DEBUG 0
|
||||||
|
|
||||||
const char* version = "1.2.0";
|
|
||||||
|
|
||||||
const char snake_vis = '#';
|
const char snake_vis = '#';
|
||||||
|
|
||||||
struct termios set_termios();
|
struct termios set_termios();
|
||||||
|
|||||||
Reference in New Issue
Block a user