tasks/build.min
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 |
#!/usr/bin/env min "min.yml" fread from-yaml :config ; Helpers ( :prog (prog which "" ==) ("$# is not available" (prog) =% error 1 exit) when ) :required ( :target-os "nim" required "Building - $# (x64)" (target-os) =% notice "nim c -d:release --cpu:amd64 --os:$# min" (target-os) =% ! {} target-os %os config /version %version pack ) :cz ( :vdata "min" :exe (vdata /os "windows" ==) ("min.exe" @exe) when "min_v$version:_$os:_x64.zip" :fn fn vdata dpairs % ":" "" replace @fn "Compressing: $#" (fn) =% notice (exe) => fn zip ) :pack ; Define module {} ( os cz ) %default ( "linux" cz ) %linux ( "macosx" cz ) %macosx ( "windows" cz ) %windows ( "hastyscribe" required "Building - guide" notice "hastyscribe Min_DeveloperGuide.md --field/version=$#" (version) =% ! ) %guide ( "hastysite" required "Building - site" notice "cd site && hastysite build && cd .." ! ) %site +build-tasks |