Skip to content

Commit

Permalink
Find a way to develop code in separate makesure.awk file #7
Browse files Browse the repository at this point in the history
  • Loading branch information
xonixx committed Feb 12, 2021
1 parent 31d997a commit 15454b1
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 7 deletions.
1 change: 1 addition & 0 deletions Makesurefile
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@
before_count=$(ls -1 /tmp/makesure.* | wc -l)

export PATH="$PATH:$MYDIR/soft/tush/bin"
export NEXT_VERSION="NEXT_VERSION"

for f in tests/*.tush
do
Expand Down
4 changes: 1 addition & 3 deletions makesure
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
#!/usr/bin/env sh

VERSION="0.9.6.1"

mydir=$(
cd "$(dirname "$0")"
pwd
)

exec awk -v "Version=$VERSION" -f "$mydir/makesure.awk" Makesurefile "$@"
exec awk -v "Version=$NEXT_VERSION" -f "$mydir/makesure.awk" Makesurefile "$@"
8 changes: 4 additions & 4 deletions tests/0_basic.tush
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@

$ cd "$MYDIR"; ./makesure -v; ./makesure --version
| 0.9.6.1
| 0.9.6.1
| NEXT_VERSION
| NEXT_VERSION

$ cd "$MYDIR/tests/emptydir"; ../../makesure -v
| 0.9.6.1
| NEXT_VERSION

$ cd "$MYDIR/tests/emptydir"; ../../makesure -h
| makesure ver. 0.9.6.1
| makesure ver. NEXT_VERSION
| Usage: makesure [options...] [-f buildfile] [goals...]
| -f,--file buildfile
| set buildfile to use (default Makesurefile)
Expand Down

0 comments on commit 15454b1

Please sign in to comment.