1
0
Fork 0
mirror of https://github.com/Luzifer/git-changerelease.git synced 2024-10-18 14:14:20 +00:00

Allow to disable tag signing

Signed-off-by: Knut Ahlers <knut@ahlers.me>
This commit is contained in:
Knut Ahlers 2017-05-08 12:27:34 +02:00
parent eee55e8e87
commit 33fc90bc3c
Signed by: luzifer
GPG key ID: DC2729FDD34BE99E
3 changed files with 13 additions and 5 deletions

View file

@ -69,7 +69,7 @@ func (fi bindataFileInfo) Sys() interface{} {
return nil return nil
} }
var _assetsGit_changereleaseYaml = []byte("\x1f\x8b\x08\x00\x00\x09\x6e\x88\x00\xff\xd2\xd5\xd5\xe5\xca\x4d\x2c\x49\xce\x88\x2f\x00\x91\x56\x5c\x0a\x0a\xba\x0a\x4a\x71\xd1\x69\x6e\xb1\x99\x15\x4a\x5c\x50\xb9\xdc\xc4\xac\xfc\x22\xb8\x9c\x53\x52\x6c\x51\x6a\x62\x76\x66\x5e\x3a\x50\x41\x51\x6a\x4e\x6a\x62\x71\x6a\x7c\x72\x7e\x6e\x6e\x66\x49\x7c\x6e\x6a\x71\x71\x62\x7a\xaa\x95\x82\x52\x41\x51\x6a\x41\x62\x51\xaa\x02\x54\x81\x42\x75\xb5\x5e\x58\x6a\x51\x71\x66\x7e\x5e\x6d\xad\x12\x17\x20\x00\x00\xff\xff\x00\xa0\x8b\xae\x78\x00\x00\x00") var _assetsGit_changereleaseYaml = []byte("\x1f\x8b\x08\x00\x00\x00\x00\x00\x00\xff\x3c\xca\x31\xae\xc2\x30\x0c\x87\xf1\xdd\xa7\xb0\xb2\xe7\x1d\xa0\xe3\x1b\x38\x02\x0b\x2a\x91\xdb\xfe\x1b\x0c\x4d\x1b\xd9\x19\x90\xaa\xde\x1d\x21\x01\xcb\xb7\xfc\xbe\x18\x23\x4d\xea\x32\x2c\x48\xae\x79\xc5\x94\x9a\x64\xef\x78\x96\xc5\x41\x54\xa4\x8d\xb7\x54\xdf\xed\x88\x39\x72\xb8\x5e\xe6\x53\xaf\xcf\xf0\xb5\x22\xf7\xcd\x7e\xf6\x3f\xf4\x06\x79\xe8\x9a\x03\x91\x61\x81\x38\xd2\xb8\x95\xa2\x2d\x15\xb8\x4b\x46\xc7\xa1\x1a\xaa\x18\xf8\x33\xf0\xbe\xff\x9d\x61\xae\xdb\x7a\x1c\x81\x5e\x01\x00\x00\xff\xff\x16\x79\xcd\x39\x94\x00\x00\x00")
func assetsGit_changereleaseYamlBytes() ([]byte, error) { func assetsGit_changereleaseYamlBytes() ([]byte, error) {
return bindataRead( return bindataRead(
@ -84,12 +84,12 @@ func assetsGit_changereleaseYaml() (*asset, error) {
return nil, err return nil, err
} }
info := bindataFileInfo{name: "assets/git_changerelease.yaml", size: 120, mode: os.FileMode(436), modTime: time.Unix(1468498243, 0)} info := bindataFileInfo{name: "assets/git_changerelease.yaml", size: 148, mode: os.FileMode(436), modTime: time.Unix(1494239100, 0)}
a := &asset{bytes: bytes, info: info} a := &asset{bytes: bytes, info: info}
return a, nil return a, nil
} }
var _assetsLog_templateMd = []byte("\x1f\x8b\x08\x00\x00\x09\x6e\x88\x00\xff\x52\x56\xa8\xae\x56\xd0\xf3\x4b\xad\x28\x09\x4b\x2d\x2a\xce\xcc\xcf\x53\xa8\xad\x55\xd0\x87\x08\xe6\x97\xeb\xb9\xe5\x17\xe5\x26\x96\x28\x28\x19\x19\x18\x98\xe9\x1a\x18\xea\x1a\x18\x29\x01\x15\x70\x01\xa5\x8b\x12\xf3\xd2\x53\x15\x54\x72\x32\xf3\x52\x15\xac\x6c\x15\xf4\x7c\xf2\xd3\x7d\x80\xec\x62\x90\xb4\x82\x82\x16\xc8\x04\xb0\xa4\x5e\x70\x69\x52\x56\x6a\x72\x09\x44\x9b\xae\x42\x6a\x5e\x0a\x88\x09\x32\x42\xcf\x3f\x27\x05\xa8\x0d\xc4\x05\x04\x00\x00\xff\xff\x04\x83\xa4\x75\x87\x00\x00\x00") var _assetsLog_templateMd = []byte("\x1f\x8b\x08\x00\x00\x00\x00\x00\x00\xff\x52\x56\xa8\xae\x56\xd0\xf3\x4b\xad\x28\x09\x4b\x2d\x2a\xce\xcc\xcf\x53\xa8\xad\x55\xd0\x87\x08\xe6\x97\xeb\xb9\xe5\x17\xe5\x26\x96\x28\x28\x19\x19\x18\x98\xe9\x1a\x18\xea\x1a\x18\x29\x29\xd4\xd6\x72\x55\x57\x2b\x14\x25\xe6\xa5\xa7\x2a\xa8\xe4\x64\xe6\xa5\x2a\x58\xd9\x2a\xe8\xf9\xe4\xa7\xfb\x64\xe6\xa5\x16\x83\xa4\x15\x14\xb4\x40\x26\x80\x25\xf5\x82\x4b\x93\xb2\x52\x93\x4b\x20\xda\x74\x15\x52\xf3\x52\x40\x4c\x90\x11\x7a\xfe\x39\x29\x3e\xf9\xe9\x20\x2e\x20\x00\x00\xff\xff\x04\x83\xa4\x75\x87\x00\x00\x00")
func assetsLog_templateMdBytes() ([]byte, error) { func assetsLog_templateMdBytes() ([]byte, error) {
return bindataRead( return bindataRead(

View file

@ -1,4 +1,6 @@
--- ---
disable_signed_tags: false
match_patch: match_patch:
- "^[fF]ix" - "^[fF]ix"

10
main.go
View file

@ -22,8 +22,9 @@ import (
) )
type configFile struct { type configFile struct {
MatchPatch []string `yaml:"match_patch"` DiableTagSigning bool `yaml:"disable_signed_tags"`
MatchMajor []string `yaml:"match_major"` MatchMajor []string `yaml:"match_major"`
MatchPatch []string `yaml:"match_patch"`
ReleaseCommitMessage string `yaml:"release_commit_message"` ReleaseCommitMessage string `yaml:"release_commit_message"`
} }
@ -243,7 +244,12 @@ func main() {
log.Fatalf("Unable to commit changelog: %s", err) log.Fatalf("Unable to commit changelog: %s", err)
} }
if _, err := gitErr("tag", "-s", "-m", stringVersion, stringVersion); err != nil { tagType := "-s" // By default use signed tags
if config.DiableTagSigning {
tagType = "-a" // If requested switch to annotated tags
}
if _, err := gitErr("tag", tagType, "-m", stringVersion, stringVersion); err != nil {
log.Fatalf("Unable to tag release: %s", err) log.Fatalf("Unable to tag release: %s", err)
} }
} }