File tree 5 files changed +13
-15
lines changed
5 files changed +13
-15
lines changed Original file line number Diff line number Diff line change @@ -212,8 +212,10 @@ jobs:
212
212
################################################################
213
213
EOF
214
214
215
+ eval `grep ^VERSION Makefile | tr -d ' '`
216
+ sed "s/@VERSION@/$VERSION/" recordings/template.txt > recordings/expected.txt
215
217
diff -u recordings/{expected,actual}.txt
216
- rm -f recordings/actual.txt
218
+ rm -f recordings/{expected, actual} .txt
217
219
218
220
- name : ' Clean'
219
221
env :
Original file line number Diff line number Diff line change
1
+ VERSION = 1.6.5
1
2
DESTDIR ?=
2
3
PREFIX ?= /usr/local
3
4
MANPREFIX ?= $(PREFIX ) /man
5
+ CPPFLAGS += -DVERSION_STR='"$(VERSION ) "'
4
6
CFLAGS += -Wall -Wextra
5
7
CFLAGS += ` pkg-config --cflags ncursesw `
6
8
LDLIBS += ` pkg-config --libs ncursesw ` -lm
22
24
23
25
.c :
24
26
@pkg-config --version > /dev/null
25
- $(CC ) $(CFLAGS ) $(LDFLAGS ) $< $(LDLIBS ) -o $@
27
+ $(CC ) $(CPPFLAGS ) $( CFLAGS ) $(LDFLAGS ) $< $(LDLIBS ) -o $@
26
28
27
29
.PHONY : all clean install uninstall
Original file line number Diff line number Diff line change 22
22
23
23
./record.sh
24
24
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
26
27
27
- git add expected .txt
28
+ git add template .txt
28
29
29
30
if git diff --cached --exit-code > /dev/null ; then
30
31
echo ' Already in sync, good.'
31
32
else
32
- EDITOR=true git commit -m ' recordings: Sync expected .txt'
33
+ EDITOR=true git commit -m ' recordings: Sync template .txt'
33
34
fi
Original file line number Diff line number Diff line change 19
19
| │ |
20
20
| └─────────────────────────────────────────────────────────────────────────────────────> |
21
21
| 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@ |
23
23
+------------------------------------------------------------------------------------------+
24
24
25
25
[90x20] Frame 2:
43
43
| │ [0m[7mX[0m[0m[7mX[0m |
44
44
| └─────────────────────────────────────────────────────────────────────────────────────> |
45
45
| 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@ |
47
47
+------------------------------------------------------------------------------------------+
48
48
49
49
[90x20] Frame 3:
67
67
| │ [0m[7mX[0m[0m[7mX[0m |
68
68
| └─────────────────────────────────────────────────────────────────────────────────────> |
69
69
| 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@ |
71
71
+------------------------------------------------------------------------------------------+
72
72
Original file line number Diff line number Diff line change 42
42
#include <err.h>
43
43
#endif
44
44
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
-
52
45
#define T_RARR '>'
53
46
#define T_UARR '^'
54
47
#ifdef NOACS
You can’t perform that action at this time.
0 commit comments