Skip to content

Commit

Permalink
Release 0.9.19 #117
Browse files Browse the repository at this point in the history
  • Loading branch information
xonixx committed Dec 10, 2022
1 parent 90154e9 commit e54733e
Show file tree
Hide file tree
Showing 5 changed files with 25 additions and 16 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
## v0.9.19
- Minor fixes to `@reached_if` in [#113](https://github.com/xonixx/makesure/issues/113)
- Minor fixes to `@lib` in [#111](https://github.com/xonixx/makesure/issues/111)

## v0.9.18
- Optimizations and fixes to `@reached_if` handling in [#104](https://github.com/xonixx/makesure/issues/104) and [#29](https://github.com/xonixx/makesure/issues/29) (thanks @08d2)
- Added autocompletion script for bash in [#75](https://github.com/xonixx/makesure/issues/75)
Expand Down
3 changes: 2 additions & 1 deletion Makesurefile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# vim: syntax=bash
@options timing

@define NEXT_VERSION='0.9.18'
@define NEXT_VERSION='0.9.19'
@define GOAWK_VERSION='1.21.0'
@define JUST_VERSION='1.3.0'
@define GOAWK="goawk$GOAWK_VERSION"
Expand Down Expand Up @@ -119,6 +119,7 @@
run_tush_file "$ITEM"

@goal tested_cov
@doc 'prepares code coverage report'
COVERPROFILE="/tmp/cov.txt"

rm -f "$COVERPROFILE"
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ By default, all scripts inside goals are executed with `bash`. If you want to us

```
$ ./makesure -h
makesure ver. 0.9.18
makesure ver. 0.9.19
Usage: makesure [options...] [-f buildfile] [goals...]
-f,--file buildfile
set buildfile to use (default Makesurefile)
Expand Down
16 changes: 9 additions & 7 deletions makesure
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/bin/sh
if command -v gawk >/dev/null;then makesure_awk='gawk -ltime -v Gawk=1';makesure_pre='';else makesure_awk=awk;makesure_pre='function gettimeofday(){}';fi
exec $makesure_awk -v "Version=0.9.18" -v "Prog=$0" "$makesure_pre"'
exec $makesure_awk -v "Version=0.9.19" -v "Prog=$0" "$makesure_pre"'
BEGIN {
Shell = "bash"
SupportedShells["bash"]
Expand All @@ -21,7 +21,7 @@ BEGIN {
function makesure() {
while (getline > 0) {
Lines[NR]=$0
if ($1 ~ /^@/ && "@define" != $1) reparseCli()
if ($1 ~ /^@/ && "@define" != $1 && "@reached_if" != $1) reparseCli()
if ("@options" == $1) handleOptions()
else if ("@define" == $1) handleDefine()
else if ("@shell" == $1) handleShell()
Expand Down Expand Up @@ -184,14 +184,14 @@ function calcGlob(goalName, pattern, script, file) {
GlobCnt = 0
GlobGoalName = goalName
split("",GlobFiles)
script = MyDirScript ";for f in " pattern ";do test -e \"$f\" && echo \"$f\";done"
script = MyDirScript ";for f in " pattern ";do test -e \"$f\"&&echo \"$f\"||:;done"
if ("sh" != Shell)
script = Shell " -c " quoteArg(script)
while ((script | getline file)>0) {
GlobCnt++
arrPush(GlobFiles,file)
}
close(script)
closeErr(script)
quicksort(GlobFiles,0,arrLen(GlobFiles)-1)
}
function parseGoalLine( priv) {
Expand Down Expand Up @@ -347,6 +347,7 @@ body,goalBody,goalBodies,resolvedGoals,exitCode, t0,t1,t2, goalTimed, list) {
emptyGoals[goalName] = length(body) == 0
goalBody[0] = ""
addLine(goalBody, preludeCode)
addLine(goalBody, CodePre[goalName])
if (goalName in GoalToLib)
addLine(goalBody, Lib[GoalToLib[goalName]])
addLine(goalBody, body)
Expand Down Expand Up @@ -449,8 +450,8 @@ function addCodeLine(line, goalName, name, i) {
Lib[name] = addL(Lib[name], line)
} else if ("goal_glob" == Mode) {
for (i=0; i < GlobCnt; i++){
if (!Code[goalName = globGoal(i)])
addCodeLineToGoal(goalName, makeGlobVarsCode(i))
if (!CodePre[goalName = globGoal(i)])
CodePre[goalName] = makeGlobVarsCode(i)
addCodeLineToGoal(goalName, line)
}
} else
Expand Down Expand Up @@ -545,9 +546,10 @@ function renderDuration(deltaMillis,\
}
function executeGetLine(script, res) {
script | getline res
close(script)
closeErr(script)
return res
}
function closeErr(script) { if (close(script)!=0) die("Error executing: " script) }
function dl(url, dest, verbose) {
verbose = "VERBOSE" in ENVIRON
if (commandExists("wget")) {
Expand Down
16 changes: 9 additions & 7 deletions makesure_candidate
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/bin/sh
if command -v gawk >/dev/null;then makesure_awk='gawk -ltime -v Gawk=1';makesure_pre='';else makesure_awk=awk;makesure_pre='function gettimeofday(){}';fi
exec $makesure_awk -v "Version=0.9.18" -v "Prog=$0" "$makesure_pre"'
exec $makesure_awk -v "Version=0.9.19" -v "Prog=$0" "$makesure_pre"'
BEGIN {
Shell = "bash"
SupportedShells["bash"]
Expand All @@ -21,7 +21,7 @@ BEGIN {
function makesure() {
while (getline > 0) {
Lines[NR]=$0
if ($1 ~ /^@/ && "@define" != $1) reparseCli()
if ($1 ~ /^@/ && "@define" != $1 && "@reached_if" != $1) reparseCli()
if ("@options" == $1) handleOptions()
else if ("@define" == $1) handleDefine()
else if ("@shell" == $1) handleShell()
Expand Down Expand Up @@ -184,14 +184,14 @@ function calcGlob(goalName, pattern, script, file) {
GlobCnt = 0
GlobGoalName = goalName
split("",GlobFiles)
script = MyDirScript ";for f in " pattern ";do test -e \"$f\" && echo \"$f\";done"
script = MyDirScript ";for f in " pattern ";do test -e \"$f\"&&echo \"$f\"||:;done"
if ("sh" != Shell)
script = Shell " -c " quoteArg(script)
while ((script | getline file)>0) {
GlobCnt++
arrPush(GlobFiles,file)
}
close(script)
closeErr(script)
quicksort(GlobFiles,0,arrLen(GlobFiles)-1)
}
function parseGoalLine( priv) {
Expand Down Expand Up @@ -347,6 +347,7 @@ body,goalBody,goalBodies,resolvedGoals,exitCode, t0,t1,t2, goalTimed, list) {
emptyGoals[goalName] = length(body) == 0
goalBody[0] = ""
addLine(goalBody, preludeCode)
addLine(goalBody, CodePre[goalName])
if (goalName in GoalToLib)
addLine(goalBody, Lib[GoalToLib[goalName]])
addLine(goalBody, body)
Expand Down Expand Up @@ -449,8 +450,8 @@ function addCodeLine(line, goalName, name, i) {
Lib[name] = addL(Lib[name], line)
} else if ("goal_glob" == Mode) {
for (i=0; i < GlobCnt; i++){
if (!Code[goalName = globGoal(i)])
addCodeLineToGoal(goalName, makeGlobVarsCode(i))
if (!CodePre[goalName = globGoal(i)])
CodePre[goalName] = makeGlobVarsCode(i)
addCodeLineToGoal(goalName, line)
}
} else
Expand Down Expand Up @@ -545,9 +546,10 @@ function renderDuration(deltaMillis,\
}
function executeGetLine(script, res) {
script | getline res
close(script)
closeErr(script)
return res
}
function closeErr(script) { if (close(script)!=0) die("Error executing: " script) }
function dl(url, dest, verbose) {
verbose = "VERBOSE" in ENVIRON
if (commandExists("wget")) {
Expand Down

0 comments on commit e54733e

Please sign in to comment.