mageproj

command module
v2.0.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 28, 2021 License: Apache-2.0 Imports: 3 Imported by: 0

README

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.

  • Build
$ mage clean build
===== validate
===== test
===== build

$ ls build/
build-info.json myapp
  • ChangeLog (optional)
$ 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"
  • Release
$ MAGEFILEP_VERSION="1.0.0" mage release
Tag v1.0.0 created and pushed to remote
  • Deploy
$ 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

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis
internal

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL