Skip to content

Commit

Permalink
Update to comply with revamp_define development
Browse files Browse the repository at this point in the history
  • Loading branch information
xonixx committed Sep 21, 2023
1 parent f36d84f commit 6b66d4c
Showing 1 changed file with 14 additions and 10 deletions.
24 changes: 14 additions & 10 deletions Makesurefile
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
# vim: syntax=bash
@options timing

@define TUSH_REPO='https://github.com/adolfopa/tush'
@define GOAWK_VERSION='1.24.0'
@define GOAWK="goawk$GOAWK_VERSION"
@define TUSH_REPO 'https://github.com/adolfopa/tush'
@define GOAWK_VERSION '1.24.0'
@define GOAWK "./soft/goawk$GOAWK_VERSION"

@goal soft_folder_created @private
@reached_if [[ -d "soft" ]]
Expand Down Expand Up @@ -65,10 +65,12 @@
@depends_on tested_by @args 'tush' './soft/busybox awk -f ./fhtagn.awk'
@depends_on tested_by @args 'fhtagn' './soft/busybox awk -f ./fhtagn.awk'

@define _GOAWK_FHTAGN_CMD "$GOAWK -f ./fhtagn.awk"

@goal tested_by_goawk
@depends_on installed_goawk
@depends_on tested_by @args 'tush' './soft/goawk1.24.0 -f ./fhtagn.awk'
@depends_on tested_by @args 'fhtagn' './soft/goawk1.24.0 -f ./fhtagn.awk'
@depends_on tested_by @args 'tush' _GOAWK_FHTAGN_CMD
@depends_on tested_by @args 'fhtagn' _GOAWK_FHTAGN_CMD

@goal tested_by @params TOOL FHTAGN
@depends_on tush_installed
Expand Down Expand Up @@ -148,7 +150,7 @@
echo "Installed: $(./soft/busybox | head -n 1)"

@goal installed_goawk @private
@reached_if [[ -f soft/$GOAWK ]]
@reached_if [[ -f $GOAWK ]]
@depends_on soft_folder_created
echo
echo "Fetching GoAWK $GOAWK_VERSION ..."
Expand All @@ -170,8 +172,8 @@
tar xzvf "$F" goawk
rm "$F"

mv goawk $GOAWK
"./$GOAWK" --version
mv goawk "goawk$GOAWK_VERSION"
"./goawk$GOAWK_VERSION" --version

@goal update_readme
@doc 'updates the README.md with the current output of the tool'
Expand All @@ -186,14 +188,16 @@
mv README.md.1 README.md


@define COVERPROFILE="/tmp/cov_fhtagn.txt"
@define COVERPROFILE "/tmp/cov_fhtagn.txt"

@goal _cover_profile_deleted @private
rm -f "$COVERPROFILE"

@define _GOAWK_COVER "$GOAWK -covermode=set -coverprofile=$COVERPROFILE -coverappend -f ./fhtagn.awk"

@goal _cover_profile_prepared @private
@depends_on _cover_profile_deleted
@depends_on tested_by @args 'fhtagn' './soft/goawk1.24.0 -covermode=set -coverprofile=/tmp/cov_fhtagn.txt -coverappend -f ./fhtagn.awk'
@depends_on tested_by @args 'fhtagn' _GOAWK_COVER

@goal coverage
@doc 'prepares code coverage report'
Expand Down

0 comments on commit 6b66d4c

Please sign in to comment.