feat: recipe sync shows changes
All checks were successful
continuous-integration/drone/push Build is passing
continuous-integration/drone/pr Build is passing

See #579
This commit is contained in:
2025-08-24 15:51:54 +02:00
parent 4cb660c348
commit 9868eb5e84
4 changed files with 50 additions and 27 deletions

View File

@ -72,7 +72,7 @@ your private key and enter your passphrase beforehand.
Run: func(cmd *cobra.Command, args []string) {
recipe := internal.ValidateRecipe(args, cmd.Name())
imagesTmp, err := getImageVersions(recipe)
imagesTmp, err := GetImageVersions(recipe)
if err != nil {
log.Fatal(err)
}
@ -151,6 +151,7 @@ your private key and enter your passphrase beforehand.
if len(tags) > 0 {
log.Warn(i18n.G("previous git tags detected, assuming new semver release"))
if err := createReleaseFromPreviousTag(tagString, mainAppVersion, recipe, tags); err != nil {
if cleanErr := cleanTag(recipe, tagString); cleanErr != nil {
log.Fatal(cleanErr)
@ -178,8 +179,8 @@ your private key and enter your passphrase beforehand.
},
}
// getImageVersions retrieves image versions for a recipe
func getImageVersions(recipe recipe.Recipe) (map[string]string, error) {
// GetImageVersions retrieves image versions for a recipe
func GetImageVersions(recipe recipe.Recipe) (map[string]string, error) {
services := make(map[string]string)
config, err := recipe.GetComposeConfig(nil)
@ -511,12 +512,6 @@ func createReleaseFromPreviousTag(tagString, mainAppVersion string, recipe recip
newTag.Major = strconv.Itoa(now + 1)
}
if tagString == "" {
if err := internal.PromptBumpType(tagString, lastGitTag.String()); err != nil {
return err
}
}
if internal.Major || internal.Minor || internal.Patch {
newTag.Metadata = mainAppVersion
tagString = newTag.String()