Appearance
var
The var instruction sets value of a variable.
var <name>="<value>"The value can be an expression involving strings and other variables.
var foo="bar"
var myvar=foo + "baz"A few special variables are implicitly defined:
last- Output of last executed commandspoonversion- Version string of the binaryyear- Current yearmonth- Current month numberday- Curent day numberhour- Current hourminute- Current minutesecond- Current seconddateiso- Current date inyyyyMMddformatdate- Current datetime- Current time
For programs started in the build container, variables are available as environment variables.
var version = ""
using python
cmd python getLatestVersion.py
var version = last
using wget
cmd wget https://example.com/application-%version%.exe
meta name = "application"
meta tag = version