From a8cb68e6967dfeb4c37717645264a3981966251e Mon Sep 17 00:00:00 2001 From: Steven Allen Date: Thu, 28 Feb 2019 19:09:31 -0800 Subject: [PATCH] automatically tag release commits --- gxutil/pm.go | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/gxutil/pm.go b/gxutil/pm.go index b7b10f2..1533662 100644 --- a/gxutil/pm.go +++ b/gxutil/pm.go @@ -306,12 +306,15 @@ func (pm *PM) InitPkg(dir, name, lang string, setup func(*Package)) error { pkg := &Package{ PackageBase: PackageBase{ - Name: name, - Author: username, - Language: lang, - Version: "0.0.0", - GxVersion: GxVersion, - ReleaseCmd: "git commit -a -m \"gx publish $VERSION\"", + Name: name, + Author: username, + Language: lang, + Version: "0.0.0", + GxVersion: GxVersion, + ReleaseCmd: "MESSAGE=\"gx publish $GX_VERSION\n\nReleased as $GX_HASH\"" + + "&& git commit -a -m \"$MESSAGE\"" + + "&& git tag -as -m \"$MESSAGE\" \"v$GX_VERSION\"" + + "&& echo 'Please remember to push tags with --tags'", }, }