mageproj
Opiniated utilities to use with Mage in order to keep magefile.go
in projects as DRY as possible.
Packages
Library: 'mgl'
A low level Mage independent package to build its own targets from scratch.
For an example of using 'mgl', see mageproj.go
Project: 'mgp'
A high level Mage dependent package to reuse as is.
For an example of using 'mgp', see magefile.go
Example
Magefile
See magefile.go for an example of magefile.
Commands
To enable verbose mode, use -v
or set MAGEFILE_VERBOSE
variable to true.
$ mage clean build
===== validate
===== test
===== build
$ ls build/
build-info.json myapp
$ MAGEFILEP_VERSION="1.0.0" mage changelog
File ChangeLog.md generated
# then commit changes
$ git add ChangeLog.md && git commit -m "Changelog for v1.0.0"
$ MAGEFILEP_VERSION="1.0.0" mage release
Tag v1.0.0 created and pushed to remote
$ MAGEFILEP_ARTIFACT_PWD='mypassword' mage deploy
===== validate
===== test
===== package
===== deploy
Uploading file: /home/anonymous/workspace/tools/myapp/build/myapp_v1.0.0_darwin-amd64.tar.gz
Received HTTP status code: 201
Uploading file: /home/anonymous/workspace/tools/myapp/build/myapp_v1.0.0_linux-amd64.tar.gz
Received HTTP status code: 201
Uploading file: /home/anonymous/workspace/tools/myapp/build/myapp_v1.0.0_windows-amd64.zip
Received HTTP status code: 201