Compare commits
15 Commits
0.13.0-rc2
...
main
| Author | SHA1 | Date | |
|---|---|---|---|
|
9d401202b4
|
|||
|
6504be6403
|
|||
| d4944dbf35 | |||
|
8d8d4f799d
|
|||
| 0633f24d1b | |||
|
2e062899c7
|
|||
|
fbd7275f03
|
|||
| cedf185e97 | |||
|
06a57ded02
|
|||
| 6f92ba0deb | |||
| dcd830e3f8 | |||
| 8056703d59 | |||
|
566bdf2bd8
|
|||
|
24288c81d3
|
|||
| a18f57488f |
25
.drone.yml
25
.drone.yml
@ -49,31 +49,6 @@ steps:
|
||||
depends_on:
|
||||
- make check
|
||||
|
||||
- name: fetch
|
||||
image: docker:git
|
||||
commands:
|
||||
- git fetch --tags
|
||||
depends_on:
|
||||
- make check
|
||||
- make test
|
||||
when:
|
||||
event: tag
|
||||
|
||||
- name: release
|
||||
image: goreleaser/goreleaser:v2.5.1
|
||||
environment:
|
||||
GITEA_TOKEN:
|
||||
from_secret: goreleaser_gitea_token
|
||||
volumes:
|
||||
- name: deps
|
||||
path: /go
|
||||
commands:
|
||||
- goreleaser release
|
||||
depends_on:
|
||||
- fetch
|
||||
when:
|
||||
event: tag
|
||||
|
||||
- name: publish image
|
||||
image: plugins/docker
|
||||
settings:
|
||||
|
||||
3
Makefile
3
Makefile
@ -86,3 +86,6 @@ build-mo:
|
||||
for lang in $(POFILES); do \
|
||||
msgfmt $$lang -o $$(echo $$lang | sed 's/.po/.mo/g') --statistics; \
|
||||
done
|
||||
|
||||
release:
|
||||
@goreleaser release --clean
|
||||
|
||||
@ -127,7 +127,7 @@ func DeployOverview(
|
||||
}
|
||||
|
||||
response := false
|
||||
prompt := &survey.Confirm{Message: "proceed?"}
|
||||
prompt := &survey.Confirm{Message: i18n.G("proceed?")}
|
||||
if err := survey.AskOne(prompt, &response); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
@ -97,6 +97,16 @@ your private key and enter your passphrase beforehand.
|
||||
log.Fatal(i18n.G("main app service version for %s is empty?", recipe.Name))
|
||||
}
|
||||
|
||||
repo, err := git.PlainOpen(recipe.Dir)
|
||||
if err != nil {
|
||||
log.Fatal(err)
|
||||
}
|
||||
|
||||
preCommitHead, err := repo.Head()
|
||||
if err != nil {
|
||||
log.Fatal(err)
|
||||
}
|
||||
|
||||
isClean, err := gitPkg.IsClean(recipe.Dir)
|
||||
if err != nil {
|
||||
log.Fatal(err)
|
||||
@ -201,11 +211,6 @@ likely to change.
|
||||
}
|
||||
|
||||
if tagString == "" {
|
||||
repo, err := git.PlainOpen(recipe.Dir)
|
||||
if err != nil {
|
||||
log.Fatal(err)
|
||||
}
|
||||
|
||||
var lastGitTag tagcmp.Tag
|
||||
iter, err := repo.Tags()
|
||||
if err != nil {
|
||||
@ -282,16 +287,6 @@ likely to change.
|
||||
log.Fatal(i18n.G("invalid version %s specified", tagString))
|
||||
}
|
||||
|
||||
mainService := "app"
|
||||
label := i18n.G("coop-cloud.${STACK_NAME}.version=%s", tagString)
|
||||
if !internal.Dry {
|
||||
if err := recipe.UpdateLabel("compose.y*ml", mainService, label); err != nil {
|
||||
log.Fatal(err)
|
||||
}
|
||||
} else {
|
||||
log.Info(i18n.G("dry run: not syncing label %s for recipe %s", tagString, recipe.Name))
|
||||
}
|
||||
|
||||
for _, tag := range tags {
|
||||
previousTagLeftHand := strings.Split(tag, "+")[0]
|
||||
newTagStringLeftHand := strings.Split(tagString, "+")[0]
|
||||
@ -300,24 +295,15 @@ likely to change.
|
||||
}
|
||||
}
|
||||
|
||||
repo, err := git.PlainOpen(recipe.Dir)
|
||||
if err != nil {
|
||||
log.Fatal(err)
|
||||
}
|
||||
|
||||
preCommitHead, err := repo.Head()
|
||||
if err != nil {
|
||||
log.Fatal(err)
|
||||
}
|
||||
|
||||
if err := createReleaseFromTag(recipe, tagString, mainAppVersion); err != nil {
|
||||
if cleanErr := cleanTag(recipe, tagString); cleanErr != nil {
|
||||
log.Fatal(cleanErr)
|
||||
log.Fatal(i18n.G("unable to clean up tag after failed release attempt: %s", cleanErr))
|
||||
}
|
||||
if cleanErr := cleanCommit(recipe, preCommitHead); cleanErr != nil {
|
||||
log.Fatal(cleanErr)
|
||||
if resetErr := resetCommit(recipe, preCommitHead); resetErr != nil {
|
||||
log.Fatal(i18n.G("unable to reset commit after failed release attempt: %s", resetErr))
|
||||
}
|
||||
log.Fatal(err)
|
||||
log.Error(err)
|
||||
log.Fatal(i18n.G("release failed. any changes made have been reverted"))
|
||||
}
|
||||
},
|
||||
}
|
||||
@ -375,23 +361,14 @@ func createReleaseFromTag(recipe recipePkg.Recipe, tagString, mainAppVersion str
|
||||
return err
|
||||
}
|
||||
|
||||
tag, err := tagcmp.Parse(tagString)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
if tag.MissingMinor {
|
||||
tag.Minor = "0"
|
||||
tag.MissingMinor = false
|
||||
}
|
||||
|
||||
if tag.MissingPatch {
|
||||
tag.Patch = "0"
|
||||
tag.MissingPatch = false
|
||||
}
|
||||
|
||||
if tagString == "" {
|
||||
tagString = fmt.Sprintf("%s+%s", tag.String(), mainAppVersion)
|
||||
mainService := "app"
|
||||
label := fmt.Sprintf("coop-cloud.${STACK_NAME}.version=%s", tagString)
|
||||
if !internal.Dry {
|
||||
if err := recipe.UpdateLabel("compose.y*ml", mainService, label); err != nil {
|
||||
log.Fatal(err)
|
||||
}
|
||||
} else {
|
||||
log.Info(i18n.G("dry run: not syncing label %s for recipe %s", tagString, recipe.Name))
|
||||
}
|
||||
|
||||
if err := addReleaseNotes(recipe, tagString); err != nil {
|
||||
@ -587,9 +564,10 @@ func pushRelease(recipe recipePkg.Recipe, tagString string) error {
|
||||
return nil
|
||||
}
|
||||
|
||||
// cleanCommit soft removes the latest release commit. No change are lost the
|
||||
// the commit itself is removed. This is the equivalent of `git reset HEAD~1`.
|
||||
func cleanCommit(recipe recipePkg.Recipe, head *plumbing.Reference) error {
|
||||
// resetCommit hard resets to the state before release was started.
|
||||
// This will only remove changes made by the release process due to requiring
|
||||
// a clean working directory.
|
||||
func resetCommit(recipe recipePkg.Recipe, head *plumbing.Reference) error {
|
||||
repo, err := git.PlainOpen(recipe.Dir)
|
||||
if err != nil {
|
||||
return errors.New(i18n.G("unable to open repo in %s: %s", recipe.Dir, err))
|
||||
@ -600,12 +578,12 @@ func cleanCommit(recipe recipePkg.Recipe, head *plumbing.Reference) error {
|
||||
return errors.New(i18n.G("unable to open work tree in %s: %s", recipe.Dir, err))
|
||||
}
|
||||
|
||||
opts := &git.ResetOptions{Commit: head.Hash(), Mode: git.MixedReset}
|
||||
opts := &git.ResetOptions{Commit: head.Hash(), Mode: git.HardReset}
|
||||
if err := worktree.Reset(opts); err != nil {
|
||||
return errors.New(i18n.G("unable to soft reset %s: %s", recipe.Dir, err))
|
||||
return errors.New(i18n.G("unable to hard reset %s: %s", recipe.Dir, err))
|
||||
}
|
||||
|
||||
log.Debug(i18n.G("removed freshly created commit"))
|
||||
log.Debug(i18n.G("reset commit to pre-release state"))
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
@ -7,7 +7,7 @@
|
||||
msgid ""
|
||||
msgstr "Project-Id-Version: \n"
|
||||
"Report-Msgid-Bugs-To: EMAIL\n"
|
||||
"POT-Creation-Date: 2026-02-20 10:49+0100\n"
|
||||
"POT-Creation-Date: 2026-03-03 01:02+0100\n"
|
||||
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
|
||||
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
||||
"Language-Team: LANGUAGE <LL@li.org>\n"
|
||||
@ -449,7 +449,7 @@ msgstr ""
|
||||
msgid "%s was successfully moved from %s to %s 🎉"
|
||||
msgstr ""
|
||||
|
||||
#: ./cli/recipe/release.go:299
|
||||
#: ./cli/recipe/release.go:294
|
||||
#, c-format
|
||||
msgid "%s+... conflicts with a previous release: %s"
|
||||
msgstr ""
|
||||
@ -1109,7 +1109,7 @@ msgstr ""
|
||||
msgid "ON SERVER"
|
||||
msgstr ""
|
||||
|
||||
#: ./cli/recipe/release.go:176
|
||||
#: ./cli/recipe/release.go:186
|
||||
msgid "PROPOSED CHANGES"
|
||||
msgstr ""
|
||||
|
||||
@ -1273,7 +1273,7 @@ msgstr ""
|
||||
msgid "SERVER"
|
||||
msgstr ""
|
||||
|
||||
#: ./cli/app/ps.go:185 ./cli/recipe/release.go:176 ./cli/recipe/version.go:69 ./cli/recipe/version.go:110
|
||||
#: ./cli/app/ps.go:185 ./cli/recipe/release.go:186 ./cli/recipe/version.go:69 ./cli/recipe/version.go:110
|
||||
msgid "SERVICE"
|
||||
msgstr ""
|
||||
|
||||
@ -1594,7 +1594,7 @@ msgstr ""
|
||||
msgid "[hijack] end of stdout"
|
||||
msgstr ""
|
||||
|
||||
#: ./cli/recipe/release.go:128
|
||||
#: ./cli/recipe/release.go:138
|
||||
#, c-format
|
||||
msgid "\n"
|
||||
"The following options are two types of initial semantic version that you can\n"
|
||||
@ -1747,7 +1747,7 @@ msgstr ""
|
||||
msgid "add [[server] | --local] [flags]"
|
||||
msgstr ""
|
||||
|
||||
#: ./cli/recipe/release.go:495
|
||||
#: ./cli/recipe/release.go:472
|
||||
msgid "add release note? (leave empty to skip)"
|
||||
msgstr ""
|
||||
|
||||
@ -1807,7 +1807,7 @@ msgstr ""
|
||||
msgid "app domain %s (%s) does not appear to resolve to app server %s (%s)?"
|
||||
msgstr ""
|
||||
|
||||
#: ./cli/recipe/release.go:363
|
||||
#: ./cli/recipe/release.go:349
|
||||
msgid "app service is missing image tag?"
|
||||
msgstr ""
|
||||
|
||||
@ -1982,7 +1982,7 @@ msgstr ""
|
||||
msgid "cannot resolve ipv4 for %s?"
|
||||
msgstr ""
|
||||
|
||||
#: ./cli/recipe/release.go:120
|
||||
#: ./cli/recipe/release.go:130
|
||||
msgid "cannot specify tag and bump type at the same time"
|
||||
msgstr ""
|
||||
|
||||
@ -2084,7 +2084,7 @@ msgstr ""
|
||||
msgid "choosing %s as latest version of %s"
|
||||
msgstr ""
|
||||
|
||||
#: ./cli/recipe/release.go:277
|
||||
#: ./cli/recipe/release.go:282
|
||||
#, c-format
|
||||
msgid "choosing %s as new version for %s"
|
||||
msgstr ""
|
||||
@ -2099,7 +2099,7 @@ msgstr ""
|
||||
msgid "choosing %s as version to upgrade"
|
||||
msgstr ""
|
||||
|
||||
#: ./cli/recipe/release.go:427
|
||||
#: ./cli/recipe/release.go:404
|
||||
#, c-format
|
||||
msgid "chore: publish %s release"
|
||||
msgstr ""
|
||||
@ -2258,7 +2258,7 @@ msgstr ""
|
||||
msgid "context lacks Docker endpoint"
|
||||
msgstr ""
|
||||
|
||||
#: ./cli/recipe/release.go:286 ./pkg/recipe/compose.go:229
|
||||
#: ./pkg/recipe/compose.go:229
|
||||
#, c-format
|
||||
msgid "coop-cloud.${STACK_NAME}.version=%s"
|
||||
msgstr ""
|
||||
@ -2322,7 +2322,7 @@ msgstr ""
|
||||
msgid "created secret on %s: %s"
|
||||
msgstr ""
|
||||
|
||||
#: ./cli/recipe/release.go:565
|
||||
#: ./cli/recipe/release.go:542
|
||||
#, c-format
|
||||
msgid "created tag %s at %s"
|
||||
msgstr ""
|
||||
@ -2570,7 +2570,7 @@ msgstr ""
|
||||
msgid "dry run: adding %s"
|
||||
msgstr ""
|
||||
|
||||
#: ./cli/recipe/release.go:455
|
||||
#: ./cli/recipe/release.go:432
|
||||
#, c-format
|
||||
msgid "dry run: move release note from 'next' to %s"
|
||||
msgstr ""
|
||||
@ -2579,11 +2579,11 @@ msgstr ""
|
||||
msgid "dry run: no changes commited"
|
||||
msgstr ""
|
||||
|
||||
#: ./cli/recipe/release.go:520
|
||||
#: ./cli/recipe/release.go:497
|
||||
msgid "dry run: no changes committed"
|
||||
msgstr ""
|
||||
|
||||
#: ./cli/catalogue/catalogue.go:271 ./cli/recipe/release.go:572
|
||||
#: ./cli/catalogue/catalogue.go:271 ./cli/recipe/release.go:549
|
||||
msgid "dry run: no changes published"
|
||||
msgstr ""
|
||||
|
||||
@ -2592,12 +2592,12 @@ msgstr ""
|
||||
msgid "dry run: no git changes pushed in %s"
|
||||
msgstr ""
|
||||
|
||||
#: ./cli/recipe/release.go:545
|
||||
#: ./cli/recipe/release.go:522
|
||||
#, c-format
|
||||
msgid "dry run: no git tag created (%s)"
|
||||
msgstr ""
|
||||
|
||||
#: ./cli/recipe/release.go:292
|
||||
#: ./cli/recipe/release.go:371
|
||||
#, c-format
|
||||
msgid "dry run: not syncing label %s for recipe %s"
|
||||
msgstr ""
|
||||
@ -2607,7 +2607,7 @@ msgstr ""
|
||||
msgid "dry run: remote %s (%s) not created"
|
||||
msgstr ""
|
||||
|
||||
#: ./cli/app/move.go:349 ./cli/catalogue/catalogue.go:301 ./cli/recipe/release.go:645
|
||||
#: ./cli/app/move.go:349 ./cli/catalogue/catalogue.go:301 ./cli/recipe/release.go:623
|
||||
msgid "dry-run"
|
||||
msgstr ""
|
||||
|
||||
@ -2741,7 +2741,7 @@ msgstr ""
|
||||
msgid "f"
|
||||
msgstr ""
|
||||
|
||||
#: ./cli/recipe/release.go:398
|
||||
#: ./cli/recipe/release.go:375
|
||||
#, c-format
|
||||
msgid "failed to add release notes: %s"
|
||||
msgstr ""
|
||||
@ -2761,7 +2761,7 @@ msgstr ""
|
||||
msgid "failed to check out %s in %s: %s"
|
||||
msgstr ""
|
||||
|
||||
#: ./cli/recipe/release.go:402
|
||||
#: ./cli/recipe/release.go:379
|
||||
#, c-format
|
||||
msgid "failed to commit changes: %s"
|
||||
msgstr ""
|
||||
@ -2849,7 +2849,7 @@ msgstr ""
|
||||
msgid "failed to parse image for %s in %s: %s"
|
||||
msgstr ""
|
||||
|
||||
#: ./cli/recipe/release.go:410
|
||||
#: ./cli/recipe/release.go:387
|
||||
#, c-format
|
||||
msgid "failed to publish new release: %s"
|
||||
msgstr ""
|
||||
@ -2918,7 +2918,7 @@ msgstr ""
|
||||
msgid "failed to store secret on %s: %s"
|
||||
msgstr ""
|
||||
|
||||
#: ./cli/recipe/release.go:406
|
||||
#: ./cli/recipe/release.go:383
|
||||
#, c-format
|
||||
msgid "failed to tag release: %s"
|
||||
msgstr ""
|
||||
@ -3291,15 +3291,15 @@ msgstr ""
|
||||
msgid "including VOLUMES=%v in backupbot exec invocation"
|
||||
msgstr ""
|
||||
|
||||
#: ./cli/recipe/release.go:656 ./cli/recipe/upgrade.go:378
|
||||
#: ./cli/recipe/release.go:634 ./cli/recipe/upgrade.go:378
|
||||
msgid "increase the major part of the version"
|
||||
msgstr ""
|
||||
|
||||
#: ./cli/recipe/release.go:664 ./cli/recipe/upgrade.go:386
|
||||
#: ./cli/recipe/release.go:642 ./cli/recipe/upgrade.go:386
|
||||
msgid "increase the minor part of the version"
|
||||
msgstr ""
|
||||
|
||||
#: ./cli/recipe/release.go:672 ./cli/recipe/upgrade.go:394
|
||||
#: ./cli/recipe/release.go:650 ./cli/recipe/upgrade.go:394
|
||||
msgid "increase the patch part of the version"
|
||||
msgstr ""
|
||||
|
||||
@ -3391,7 +3391,7 @@ msgstr ""
|
||||
msgid "invalid tmpfs source, source must be empty"
|
||||
msgstr ""
|
||||
|
||||
#: ./cli/recipe/release.go:282
|
||||
#: ./cli/recipe/release.go:287
|
||||
#, c-format
|
||||
msgid "invalid version %s specified"
|
||||
msgstr ""
|
||||
@ -3547,7 +3547,7 @@ msgstr ""
|
||||
msgid "main app service version for %s is empty?"
|
||||
msgstr ""
|
||||
|
||||
#: ./cli/internal/recipe.go:48 ./cli/internal/recipe.go:66 ./cli/internal/recipe.go:80 ./cli/recipe/release.go:653 ./cli/recipe/upgrade.go:375
|
||||
#: ./cli/internal/recipe.go:48 ./cli/internal/recipe.go:66 ./cli/internal/recipe.go:80 ./cli/recipe/release.go:631 ./cli/recipe/upgrade.go:375
|
||||
msgid "major"
|
||||
msgstr ""
|
||||
|
||||
@ -3576,7 +3576,7 @@ msgstr ""
|
||||
msgid "migrating app config from %s to %s"
|
||||
msgstr ""
|
||||
|
||||
#: ./cli/internal/recipe.go:48 ./cli/internal/recipe.go:68 ./cli/internal/recipe.go:82 ./cli/recipe/release.go:661 ./cli/recipe/upgrade.go:383
|
||||
#: ./cli/internal/recipe.go:48 ./cli/internal/recipe.go:68 ./cli/internal/recipe.go:82 ./cli/recipe/release.go:639 ./cli/recipe/upgrade.go:383
|
||||
msgid "minor"
|
||||
msgstr ""
|
||||
|
||||
@ -3675,7 +3675,7 @@ msgstr ""
|
||||
msgid "new recipe '%s' created: %s"
|
||||
msgstr ""
|
||||
|
||||
#: ./cli/recipe/release.go:585
|
||||
#: ./cli/recipe/release.go:562
|
||||
#, c-format
|
||||
msgid "new release published: %s"
|
||||
msgstr ""
|
||||
@ -3726,7 +3726,7 @@ msgstr ""
|
||||
msgid "no backupbot discovered, is it deployed?"
|
||||
msgstr ""
|
||||
|
||||
#: ./cli/catalogue/catalogue.go:231 ./cli/recipe/release.go:531
|
||||
#: ./cli/catalogue/catalogue.go:231 ./cli/recipe/release.go:508
|
||||
#, c-format
|
||||
msgid "no changes discovered in %s, nothing to publish?"
|
||||
msgstr ""
|
||||
@ -3760,7 +3760,7 @@ msgstr ""
|
||||
msgid "no existing label found, automagic insertion not supported yet"
|
||||
msgstr ""
|
||||
|
||||
#: ./cli/recipe/release.go:124
|
||||
#: ./cli/recipe/release.go:134
|
||||
#, c-format
|
||||
msgid "no git tags found for %s"
|
||||
msgstr ""
|
||||
@ -3994,7 +3994,7 @@ msgstr ""
|
||||
msgid "pass command not found on $PATH, is it installed?"
|
||||
msgstr ""
|
||||
|
||||
#: ./cli/internal/recipe.go:48 ./cli/internal/recipe.go:70 ./cli/internal/recipe.go:84 ./cli/recipe/release.go:669 ./cli/recipe/upgrade.go:391
|
||||
#: ./cli/internal/recipe.go:48 ./cli/internal/recipe.go:70 ./cli/internal/recipe.go:84 ./cli/recipe/release.go:647 ./cli/recipe/upgrade.go:391
|
||||
msgid "patch"
|
||||
msgstr ""
|
||||
|
||||
@ -4052,7 +4052,7 @@ msgstr ""
|
||||
msgid "print machine-readable output"
|
||||
msgstr ""
|
||||
|
||||
#: ./cli/internal/deploy.go:231
|
||||
#: ./cli/internal/deploy.go:130 ./cli/internal/deploy.go:231
|
||||
msgid "proceed?"
|
||||
msgstr ""
|
||||
|
||||
@ -4114,7 +4114,7 @@ msgstr ""
|
||||
#. with no spaces in between
|
||||
#. translators: `abra recipe` aliases. use a comma separated list of aliases
|
||||
#. with no spaces in between
|
||||
#: ./cli/app/backup.go:327 ./cli/app/list.go:304 ./cli/app/move.go:350 ./cli/app/run.go:23 ./cli/app/upgrade.go:486 ./cli/catalogue/catalogue.go:302 ./cli/recipe/recipe.go:12 ./cli/recipe/release.go:646
|
||||
#: ./cli/app/backup.go:327 ./cli/app/list.go:304 ./cli/app/move.go:350 ./cli/app/run.go:23 ./cli/app/upgrade.go:486 ./cli/catalogue/catalogue.go:302 ./cli/recipe/recipe.go:12 ./cli/recipe/release.go:624
|
||||
msgid "r"
|
||||
msgstr ""
|
||||
|
||||
@ -4230,6 +4230,10 @@ msgstr ""
|
||||
msgid "release <recipe> [version] [flags]"
|
||||
msgstr ""
|
||||
|
||||
#: ./cli/recipe/release.go:306
|
||||
msgid "release failed. any changes made have been reverted"
|
||||
msgstr ""
|
||||
|
||||
#: ./cli/app/upgrade.go:485
|
||||
msgid "releasenotes"
|
||||
msgstr ""
|
||||
@ -4290,11 +4294,7 @@ msgstr ""
|
||||
msgid "removed dirty suffix from .env version: %s -> %s"
|
||||
msgstr ""
|
||||
|
||||
#: ./cli/recipe/release.go:608
|
||||
msgid "removed freshly created commit"
|
||||
msgstr ""
|
||||
|
||||
#: ./cli/recipe/release.go:626
|
||||
#: ./cli/recipe/release.go:604
|
||||
#, c-format
|
||||
msgid "removed freshly created tag %s"
|
||||
msgstr ""
|
||||
@ -4366,7 +4366,7 @@ msgstr ""
|
||||
msgid "repo set config: %s"
|
||||
msgstr ""
|
||||
|
||||
#: ./cli/app/move.go:352 ./cli/catalogue/catalogue.go:304 ./cli/recipe/release.go:648
|
||||
#: ./cli/app/move.go:352 ./cli/catalogue/catalogue.go:304 ./cli/recipe/release.go:626
|
||||
msgid "report changes that would be made"
|
||||
msgstr ""
|
||||
|
||||
@ -4387,6 +4387,10 @@ msgstr ""
|
||||
msgid "reset <recipe> [flags]"
|
||||
msgstr ""
|
||||
|
||||
#: ./cli/recipe/release.go:586
|
||||
msgid "reset commit to pre-release state"
|
||||
msgstr ""
|
||||
|
||||
#: ./cli/recipe/lint.go:45
|
||||
msgid "resolve"
|
||||
msgstr ""
|
||||
@ -4931,7 +4935,7 @@ msgstr ""
|
||||
msgid "ssh url: %s, "
|
||||
msgstr ""
|
||||
|
||||
#: ./cli/recipe/release.go:577
|
||||
#: ./cli/recipe/release.go:554
|
||||
msgid "ssh-agent not found. see \"abra recipe release --help\" and try again"
|
||||
msgstr ""
|
||||
|
||||
@ -5011,7 +5015,7 @@ msgstr ""
|
||||
msgid "tag all images with stable tags"
|
||||
msgstr ""
|
||||
|
||||
#: ./cli/recipe/release.go:218
|
||||
#: ./cli/recipe/release.go:223
|
||||
#, c-format
|
||||
msgid "tag at commit %s is unannotated or otherwise broken"
|
||||
msgstr ""
|
||||
@ -5144,6 +5148,11 @@ msgstr ""
|
||||
msgid "unable to clean up git clone of %s: %s"
|
||||
msgstr ""
|
||||
|
||||
#: ./cli/recipe/release.go:300
|
||||
#, c-format
|
||||
msgid "unable to clean up tag after failed release attempt: %s"
|
||||
msgstr ""
|
||||
|
||||
#: ./cli/app/list.go:152
|
||||
#, c-format
|
||||
msgid "unable to clone %s: %s"
|
||||
@ -5154,7 +5163,7 @@ msgstr ""
|
||||
msgid "unable to connect to %s, please check your SSH config"
|
||||
msgstr ""
|
||||
|
||||
#: ./cli/recipe/release.go:126
|
||||
#: ./cli/recipe/release.go:136
|
||||
msgid "unable to continue, input required for initial version"
|
||||
msgstr ""
|
||||
|
||||
@ -5178,7 +5187,7 @@ msgstr ""
|
||||
msgid "unable to create local context: %s"
|
||||
msgstr ""
|
||||
|
||||
#: ./cli/recipe/release.go:622
|
||||
#: ./cli/recipe/release.go:600
|
||||
#, c-format
|
||||
msgid "unable to delete tag %s: %s"
|
||||
msgstr ""
|
||||
@ -5223,6 +5232,11 @@ msgstr ""
|
||||
msgid "unable to git pull in %s: %s"
|
||||
msgstr ""
|
||||
|
||||
#: ./cli/recipe/release.go:583
|
||||
#, c-format
|
||||
msgid "unable to hard reset %s: %s"
|
||||
msgstr ""
|
||||
|
||||
#: ./cli/app/env.go:158
|
||||
#, c-format
|
||||
msgid "unable to inspect container for %s: %s"
|
||||
@ -5252,12 +5266,12 @@ msgstr ""
|
||||
msgid "unable to open git work tree in %s: %s"
|
||||
msgstr ""
|
||||
|
||||
#: ./cli/recipe/release.go:595 ./cli/recipe/release.go:617
|
||||
#: ./cli/recipe/release.go:573 ./cli/recipe/release.go:595
|
||||
#, c-format
|
||||
msgid "unable to open repo in %s: %s"
|
||||
msgstr ""
|
||||
|
||||
#: ./cli/recipe/release.go:600
|
||||
#: ./cli/recipe/release.go:578
|
||||
#, c-format
|
||||
msgid "unable to open work tree in %s: %s"
|
||||
msgstr ""
|
||||
@ -5337,6 +5351,11 @@ msgstr ""
|
||||
msgid "unable to render to JSON: %s"
|
||||
msgstr ""
|
||||
|
||||
#: ./cli/recipe/release.go:303
|
||||
#, c-format
|
||||
msgid "unable to reset commit after failed release attempt: %s"
|
||||
msgstr ""
|
||||
|
||||
#: ./pkg/recipe/git.go:166
|
||||
#, c-format
|
||||
msgid "unable to resolve '%s': %s"
|
||||
@ -5377,11 +5396,6 @@ msgstr ""
|
||||
msgid "unable to setup input stream: %s"
|
||||
msgstr ""
|
||||
|
||||
#: ./cli/recipe/release.go:605
|
||||
#, c-format
|
||||
msgid "unable to soft reset %s: %s"
|
||||
msgstr ""
|
||||
|
||||
#: ./cli/internal/validate.go:84
|
||||
#, c-format
|
||||
msgid "unable to validate recipe: %s"
|
||||
@ -5551,7 +5565,7 @@ msgstr ""
|
||||
msgid "use local server"
|
||||
msgstr ""
|
||||
|
||||
#: ./cli/recipe/release.go:461
|
||||
#: ./cli/recipe/release.go:438
|
||||
msgid "use release note in release/next?"
|
||||
msgstr ""
|
||||
|
||||
@ -5760,7 +5774,7 @@ msgstr ""
|
||||
msgid "which service are you looking for?"
|
||||
msgstr ""
|
||||
|
||||
#: ./cli/recipe/release.go:148
|
||||
#: ./cli/recipe/release.go:158
|
||||
msgid "which version do you want to begin with?"
|
||||
msgstr ""
|
||||
|
||||
@ -5772,7 +5786,7 @@ msgstr ""
|
||||
msgid "wire up healthchecks"
|
||||
msgstr ""
|
||||
|
||||
#: ./cli/recipe/release.go:106
|
||||
#: ./cli/recipe/release.go:116
|
||||
#, c-format
|
||||
msgid "working directory not clean in %s, aborting"
|
||||
msgstr ""
|
||||
@ -5787,11 +5801,11 @@ msgstr ""
|
||||
msgid "writing recipe version failed: %s"
|
||||
msgstr ""
|
||||
|
||||
#: ./cli/recipe/release.go:654 ./cli/recipe/upgrade.go:376
|
||||
#: ./cli/recipe/release.go:632 ./cli/recipe/upgrade.go:376
|
||||
msgid "x"
|
||||
msgstr ""
|
||||
|
||||
#: ./cli/recipe/release.go:662 ./cli/recipe/upgrade.go:384
|
||||
#: ./cli/recipe/release.go:640 ./cli/recipe/upgrade.go:384
|
||||
msgid "y"
|
||||
msgstr ""
|
||||
|
||||
@ -5799,11 +5813,11 @@ msgstr ""
|
||||
msgid "you can only use one of: --major, --minor, --patch."
|
||||
msgstr ""
|
||||
|
||||
#: ./cli/recipe/release.go:243
|
||||
#: ./cli/recipe/release.go:248
|
||||
msgid "you can only use one version flag: --major, --minor or --patch"
|
||||
msgstr ""
|
||||
|
||||
#: ./cli/recipe/release.go:670 ./cli/recipe/upgrade.go:392
|
||||
#: ./cli/recipe/release.go:648 ./cli/recipe/upgrade.go:392
|
||||
msgid "z"
|
||||
msgstr ""
|
||||
|
||||
|
||||
Binary file not shown.
File diff suppressed because it is too large
Load Diff
@ -1,8 +1,8 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
ABRA_VERSION="0.12.0-beta"
|
||||
ABRA_VERSION="0.13.0-beta"
|
||||
ABRA_RELEASE_URL="https://git.coopcloud.tech/api/v1/repos/toolshed/abra/releases/tags/$ABRA_VERSION"
|
||||
RC_VERSION="0.13.0-rc2-beta"
|
||||
RC_VERSION="0.13.0-beta"
|
||||
RC_VERSION_URL="https://git.coopcloud.tech/api/v1/repos/toolshed/abra/releases/tags/$RC_VERSION"
|
||||
|
||||
for arg in "$@"; do
|
||||
|
||||
@ -217,3 +217,53 @@ teardown() {
|
||||
assert_failure
|
||||
assert_output --partial "automagic insertion not supported yet"
|
||||
}
|
||||
|
||||
@test "push during release fails" {
|
||||
tagHash=$(_get_tag_hash "0.2.0+1.21.0")
|
||||
run git -C "$ABRA_DIR/recipes/$TEST_RECIPE" checkout "$tagHash"
|
||||
assert_success
|
||||
|
||||
run $ABRA recipe upgrade "$TEST_RECIPE" --no-input --patch --commit
|
||||
assert_success
|
||||
|
||||
run git -C "$ABRA_DIR/recipes/$TEST_RECIPE" show
|
||||
assert_success
|
||||
assert_output --partial 'image: nginx:1.21.6'
|
||||
|
||||
wantHash="$(_get_current_hash)"
|
||||
|
||||
run git -C "$ABRA_DIR/recipes/$TEST_RECIPE" remote set-url origin-ssh "$ABRA_DIR/does/not/exist"
|
||||
assert_success
|
||||
|
||||
run $ABRA recipe release "$TEST_RECIPE" --no-input --patch
|
||||
assert_failure
|
||||
assert_output --partial 'failed to publish new release:'
|
||||
assert_output --partial 'any changes made have been reverted'
|
||||
|
||||
assert_equal "$wantHash" "$(_get_current_hash)"
|
||||
|
||||
assert_equal "$(_git_status)" ""
|
||||
}
|
||||
|
||||
@test "release, fail, release: works" {
|
||||
tagHash=$(_get_tag_hash "0.2.0+1.21.0")
|
||||
run git -C "$ABRA_DIR/recipes/$TEST_RECIPE" checkout "$tagHash"
|
||||
assert_success
|
||||
|
||||
run $ABRA recipe upgrade "$TEST_RECIPE" --no-input --patch --commit
|
||||
assert_success
|
||||
|
||||
# NOTE(d1): fake broken remote so the release fails
|
||||
run git -C "$ABRA_DIR/recipes/$TEST_RECIPE" remote set-url origin-ssh "$ABRA_DIR/does/not/exist"
|
||||
assert_success
|
||||
|
||||
run $ABRA recipe release "$TEST_RECIPE" --no-input --patch
|
||||
assert_failure
|
||||
|
||||
# NOTE(d1): correct remote so release can proceed
|
||||
run git -C "$ABRA_DIR/recipes/$TEST_RECIPE" remote set-url origin-ssh "$ABRA_DIR/origin-recipes/$TEST_RECIPE.git"
|
||||
assert_success
|
||||
|
||||
run $ABRA recipe release "$TEST_RECIPE" --no-input --patch
|
||||
assert_success
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user