Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix generated headers: Fetch whole git history for devctl #942

Merged
merged 1 commit into from
Apr 25, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
1 change: 1 addition & 0 deletions .github/workflows/zz_generated.create_release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -296,6 +296,7 @@ jobs:
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
with:
ref: ${{ env.TAG }}
fetch-depth: 0 # devctl specific, we need the whole git history for generating the correct urls in header templates
- name: Create ${{ matrix.platform }} package
run: make package-${{ matrix.platform }}
- name: Specify package file name based on platform
Expand Down
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,11 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [Unreleased]

### Fixed

- Add logic to fetch the whole git history when generating the "Create Release" GitHub actions workflow file for devctl.
- Fetch whole git history for releases to fix GitHub Urls in templated file headers.

## [6.26.0] - 2024-04-24

### Fixed
Expand Down
2 changes: 2 additions & 0 deletions pkg/gen/input/workflows/internal/file/create_release.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ package file

import (
_ "embed"
"strings"

"github.com/giantswarm/devctl/v6/pkg/gen/input"
"github.com/giantswarm/devctl/v6/pkg/gen/input/workflows/internal/params"
Expand All @@ -27,6 +28,7 @@ func NewCreateReleaseInput(p params.Params) input.Input {
"EnableFloatingMajorVersionTags": params.EnableFloatingMajorVersionTags(p),
"IsFlavourCLI": params.IsFlavourCLI(p),
"StepSetUpGitIdentity": params.StepSetUpGitIdentity(),
"IsDevctl": strings.HasPrefix(createReleaseTemplateSha, "https://github.com/giantswarm/devctl"),
},
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -301,6 +301,9 @@ jobs:
uses: actions/checkout@1d96c772d19495a3b5c517cd2bc0cb401ea0529f # v4.1.3
with:
ref: ${{ env.TAG }}
{{{{- if .IsDevctl }}}}
fetch-depth: 0 # devctl specific, we need the whole git history for generating the correct urls in header templates
{{{{- end }}}}
- name: Create ${{ matrix.platform }} package
run: make package-${{ matrix.platform }}
- name: Specify package file name based on platform
Expand Down