forked from toolshed/abra
		
	fix: release functionality working again
This commit is contained in:
		@ -198,7 +198,9 @@ func createReleaseFromTag(recipe recipe.Recipe, tagString, mainAppVersion string
 | 
			
		||||
		logrus.Fatal(err)
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	if tagString == "" {
 | 
			
		||||
		tagString = fmt.Sprintf("%s+%s", tag.String(), mainAppVersion)
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	if err := tagRelease(tagString, repo); err != nil {
 | 
			
		||||
		logrus.Fatal(err)
 | 
			
		||||
@ -252,7 +254,7 @@ func commitRelease(recipe recipe.Recipe) error {
 | 
			
		||||
		}
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	if internal.CommitMessage == "" && !internal.NoInput {
 | 
			
		||||
	if internal.CommitMessage == "" && !internal.NoInput && internal.Commit {
 | 
			
		||||
		prompt := &survey.Input{
 | 
			
		||||
			Message: "commit message",
 | 
			
		||||
			Default: "chore: publish new %s version",
 | 
			
		||||
@ -274,7 +276,7 @@ func commitRelease(recipe recipe.Recipe) error {
 | 
			
		||||
 | 
			
		||||
func tagRelease(tagString string, repo *git.Repository) error {
 | 
			
		||||
	if internal.Dry {
 | 
			
		||||
		logrus.Info("dry run: no git tag created")
 | 
			
		||||
		logrus.Infof("dry run: no git tag created (%s)", tagString)
 | 
			
		||||
		return nil
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
@ -335,7 +337,7 @@ func createReleaseFromPreviousTag(tagString, mainAppVersion string, recipe recip
 | 
			
		||||
	bumpType := btoi(internal.Major)*4 + btoi(internal.Minor)*2 + btoi(internal.Patch)
 | 
			
		||||
	if bumpType != 0 {
 | 
			
		||||
		if (bumpType & (bumpType - 1)) != 0 {
 | 
			
		||||
			fmt.Errorf("you can only use one of: --major, --minor, --patch.")
 | 
			
		||||
			return fmt.Errorf("you can only use one of: --major, --minor, --patch")
 | 
			
		||||
		}
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
@ -358,7 +360,6 @@ func createReleaseFromPreviousTag(tagString, mainAppVersion string, recipe recip
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	newTag := lastGitTag
 | 
			
		||||
	if bumpType > 0 {
 | 
			
		||||
	if internal.Patch {
 | 
			
		||||
		now, err := strconv.Atoi(newTag.Patch)
 | 
			
		||||
		if err != nil {
 | 
			
		||||
@ -384,7 +385,6 @@ func createReleaseFromPreviousTag(tagString, mainAppVersion string, recipe recip
 | 
			
		||||
		newTag.Minor = "0"
 | 
			
		||||
		newTag.Major = strconv.Itoa(now + 1)
 | 
			
		||||
	}
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	if err := commitRelease(recipe); err != nil {
 | 
			
		||||
		logrus.Fatal(err)
 | 
			
		||||
 | 
			
		||||
		Reference in New Issue
	
	Block a user