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 @@ -205,8 +205,10 @@ jobs:
205205 ################################################################
206206 EOF
207207
208+ eval `grep ^VERSION Makefile | tr -d ' '`
209+ sed "s/@VERSION@/$VERSION/" recordings/template.txt > recordings/expected.txt
208210 diff -u recordings/{expected,actual}.txt
209- rm -f recordings/actual.txt
211+ rm -f recordings/{expected, actual} .txt
210212
211213 - name : ' Clean'
212214 env :
Original file line number Diff line number Diff line change 1+ VERSION = 1.7.2
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.7.0 |
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.7.0 |
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.7.0 |
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 4141#include <err.h>
4242#endif
4343
44- #define STR_ (x ) #x
45- #define STR (x ) STR_(x)
46- #define VERSION_MAJOR 1
47- #define VERSION_MINOR 7
48- #define VERSION_PATCH 2
49- #define VERSION_STR STR(VERSION_MAJOR) "." STR(VERSION_MINOR) "." STR(VERSION_PATCH)
50-
5144#define T_RARR '>'
5245#define T_UARR '^'
5346#ifdef NOACS
You can’t perform that action at this time.
0 commit comments