File tree Expand file tree Collapse file tree 5 files changed +13
-15
lines changed Expand file tree Collapse file tree 5 files changed +13
-15
lines changed Original file line number Diff line number Diff line change @@ -212,8 +212,10 @@ jobs:
212212 ################################################################
213213 EOF
214214
215+ eval `grep ^VERSION Makefile | tr -d ' '`
216+ sed "s/@VERSION@/$VERSION/" recordings/template.txt > recordings/expected.txt
215217 diff -u recordings/{expected,actual}.txt
216- rm -f recordings/actual.txt
218+ rm -f recordings/{expected, actual} .txt
217219
218220 - name : ' Clean'
219221 env :
Original file line number Diff line number Diff line change 1+ VERSION = 1.6.5
12DESTDIR ?=
23PREFIX ?= /usr/local
34MANPREFIX ?= $(PREFIX ) /man
5+ CPPFLAGS += -DVERSION_STR='"$(VERSION ) "'
46CFLAGS += -Wall -Wextra
57CFLAGS += ` pkg-config --cflags ncursesw `
68LDLIBS += ` pkg-config --libs ncursesw ` -lm
2224
2325.c :
2426 @pkg-config --version > /dev/null
25- $(CC ) $(CFLAGS ) $(LDFLAGS ) $< $(LDLIBS ) -o $@
27+ $(CC ) $(CPPFLAGS ) $( CFLAGS ) $(LDFLAGS ) $< $(LDLIBS ) -o $@
2628
2729.PHONY : all clean install uninstall
Original file line number Diff line number Diff line change 2222
2323./record.sh
2424
25- cp actual.txt expected.txt
25+ eval ` grep ^VERSION ../Makefile | tr -d ' ' ` # get the version number
26+ sed " s/$VERSION /@VERSION@/" actual.txt > template.txt
2627
27- git add expected .txt
28+ git add template .txt
2829
2930if git diff --cached --exit-code > /dev/null ; then
3031 echo ' Already in sync, good.'
3132else
32- EDITOR=true git commit -m ' recordings: Sync expected .txt'
33+ EDITOR=true git commit -m ' recordings: Sync template .txt'
3334fi
Original file line number Diff line number Diff line change 1919| │ |
2020| └─────────────────────────────────────────────────────────────────────────────────────> |
2121| X Thu Jan 1 00:00:00 1970 |
22- | [0m[7m [0m https://github.com/tenox7/ttyplot 1.6.5 |
22+ | [0m[7m [0m https://github.com/tenox7/ttyplot @VERSION@ |
2323+------------------------------------------------------------------------------------------+
2424
2525[90x20] Frame 2:
4343| │ [0m[7mX[0m[0m[7mX[0m |
4444| └─────────────────────────────────────────────────────────────────────────────────────> |
4545| X last=3.0 min=1.0 max=3.0 avg=2.0 Thu Jan 1 00:00:00 1970 |
46- | [0m[7m [0m last=4.0 min=2.0 max=4.0 avg=3.0 https://github.com/tenox7/ttyplot 1.6.5 |
46+ | [0m[7m [0m last=4.0 min=2.0 max=4.0 avg=3.0 https://github.com/tenox7/ttyplot @VERSION@ |
4747+------------------------------------------------------------------------------------------+
4848
4949[90x20] Frame 3:
6767| │ [0m[7mX[0m[0m[7mX[0m |
6868| └─────────────────────────────────────────────────────────────────────────────────────> |
6969| X last=3.0 min=1.0 max=3.0 avg=2.0 Thu Jan 1 00:00:00 1970 |
70- | [0m[7m [0m last=4.0 min=2.0 max=4.0 avg=3.0 https://github.com/tenox7/ttyplot 1.6.5 |
70+ | [0m[7m [0m last=4.0 min=2.0 max=4.0 avg=3.0 https://github.com/tenox7/ttyplot @VERSION@ |
7171+------------------------------------------------------------------------------------------+
7272
Original file line number Diff line number Diff line change 4242#include <err.h>
4343#endif
4444
45- #define STR_ (x ) #x
46- #define STR (x ) STR_(x)
47- #define VERSION_MAJOR 1
48- #define VERSION_MINOR 6
49- #define VERSION_PATCH 5
50- #define VERSION_STR STR(VERSION_MAJOR) "." STR(VERSION_MINOR) "." STR(VERSION_PATCH)
51-
5245#define T_RARR '>'
5346#define T_UARR '^'
5447#ifdef NOACS
You can’t perform that action at this time.
0 commit comments