Wish cli compile options & linux compiler

ggpanta

Member
Licensed User
Longtime User
There are the features I am really missing since they would make my life a lot easier.

What I need is the ability to set the value of a variable from the cli compiler.

All my builds in every language except B4A works like that.

(local machine)
git-pull
git-push

(linux VM hosting my repos)
initiate build from git-hook on push
build with -ldflags to set the build version, the current commit hash and the builddate
push the apk to my android devices and run tests (custom script)
tool sets flags, log errors and take screenshots.


In B4A this is currently impossible, I know that the linux compiler is probably not going to happen but even if you could add the ability to set a var from flags during build would be amazing since I can automate the rest from my local machine.

As an example this is the build line for a go project so you can get the idea:

go build -ldflags "-X main.version=$GOARCH -X main.buildstamp=`date -u '+%Y-%m-%d-%I:%M:%S%p'` -X main.hash=`git rev-parse HEAD`" -o builds/Windows/esgtools_x64.exe

In the above the var version in main will get the $GOARCH environment variable, etc

Thanks in advance.
 
Top