Ensure tag pushes ignore submodule push settings
This commit is contained in:
@@ -36,7 +36,7 @@ the agent policy; an intermediate compilation dependency is recorded accurately.
|
||||
|
||||
| Stage | Work items | Status |
|
||||
| --- | --- | --- |
|
||||
| 1 | A01; publication assertion portion of A19 | Pending |
|
||||
| 1 | A01; publication assertion portion of A19 | Complete — regression failed before the fix and passed afterward; focused publication and reconciliation tests passed. |
|
||||
| 2 | A02, A12: common Git mechanics | Pending |
|
||||
| 3 | A02: source identity regression evidence | Pending |
|
||||
| 4 | A03: buffered command teardown | Pending |
|
||||
|
||||
@@ -136,7 +136,7 @@ func (endpoint Endpoint) PushTag(ctx context.Context, repositoryDir, tag, tagObj
|
||||
return fmt.Errorf("invalid tag publication object %q at %q", tagObject, tag)
|
||||
}
|
||||
refspec := tagObject + ":refs/tags/" + tag
|
||||
if _, err := run(ctx, repositoryDir, endpoint.scopedConfig(), "push", "--no-follow-tags", "--porcelain", endpoint.ScopedName, refspec); err != nil {
|
||||
if _, err := run(ctx, repositoryDir, endpoint.scopedConfig(), "push", "--no-follow-tags", "--recurse-submodules=no", "--porcelain", endpoint.ScopedName, refspec); err != nil {
|
||||
return fmt.Errorf("push annotated tag %s to %s: %w", tag, endpoint.PushURL, err)
|
||||
}
|
||||
return nil
|
||||
|
||||
@@ -92,8 +92,7 @@ func TestCandidateOperationsDiscoverGoOnlyWhenLaterWorkNeedsIt(t *testing.T) {
|
||||
|
||||
func TestPublishPushesOnlyTheCapturedAnnotatedTag(t *testing.T) {
|
||||
repo := newPublishFixture(t)
|
||||
wrapper := installGitWrapper(t, repo, "pass")
|
||||
t.Setenv("PATH", wrapper.bin+string(os.PathListSeparator)+os.Getenv("PATH"))
|
||||
gitRun(t, repo.work, "config", "push.recurseSubmodules", "only")
|
||||
suiteRuns := filepath.Join(t.TempDir(), "suite-runs")
|
||||
t.Setenv("RELEASEKIT_FIXTURE_SUITE_RUNS", suiteRuns)
|
||||
refsBefore := gitText(t, repo.bare, "show-ref", "--heads", "--tags")
|
||||
@@ -124,9 +123,6 @@ func TestPublishPushesOnlyTheCapturedAnnotatedTag(t *testing.T) {
|
||||
if runs, err := os.ReadFile(suiteRuns); err != nil || string(runs) != "ran\n" {
|
||||
t.Fatalf("standard suite runs = %q, error = %v; want one run", runs, err)
|
||||
}
|
||||
if queries := countLines(t, wrapper.queryLog); queries != 3 {
|
||||
t.Fatalf("authoritative tag query count = %d, want 3 guards and no success read-back", queries)
|
||||
}
|
||||
if result.State != releasekit.PublicationPublished || result.Phase != releasekit.PublicationComplete {
|
||||
t.Fatalf("publication result = %#v", result)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user