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

use -s -w ldflags for release artifacts #33041

Merged
merged 1 commit into from
Dec 30, 2024

Conversation

techknowlogick
Copy link
Member

fix #33030

@techknowlogick techknowlogick added topic/build PR changes how Gitea is built, i.e. regarding Docker or the Makefile skip-changelog This PR is irrelevant for the (next) changelog, for example bug fixes for unreleased features. backport/v1.23 This PR should be backported to Gitea 1.23 labels Dec 30, 2024
@GiteaBot GiteaBot added the lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. label Dec 30, 2024
@pull-request-size pull-request-size bot added the size/S Denotes a PR that changes 10-29 lines, ignoring generated files. label Dec 30, 2024
@GiteaBot GiteaBot added lgtm/need 1 This PR needs approval from one additional maintainer to be merged. and removed lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. labels Dec 30, 2024
@GiteaBot GiteaBot added lgtm/done This PR has enough approvals to get merged. There are no important open reservations anymore. and removed lgtm/need 1 This PR needs approval from one additional maintainer to be merged. labels Dec 30, 2024
@lunny lunny added the reviewed/wait-merge This pull request is part of the merge queue. It will be merged soon. label Dec 30, 2024
@lunny lunny enabled auto-merge (squash) December 30, 2024 02:27
@lunny lunny merged commit 232867c into go-gitea:main Dec 30, 2024
26 checks passed
@GiteaBot GiteaBot added this to the 1.24.0 milestone Dec 30, 2024
GiteaBot pushed a commit to GiteaBot/gitea that referenced this pull request Dec 30, 2024
@GiteaBot GiteaBot added backport/done All backports for this PR have been created and removed reviewed/wait-merge This pull request is part of the merge queue. It will be merged soon. labels Dec 30, 2024
lunny pushed a commit that referenced this pull request Dec 30, 2024
Backport #33041 by @techknowlogick

fix #33030

Co-authored-by: techknowlogick <techknowlogick@gitea.com>
@@ -806,22 +806,22 @@ $(DIST_DIRS):

.PHONY: release-windows
release-windows: | $(DIST_DIRS)
CGO_CFLAGS="$(CGO_CFLAGS)" $(GO) run $(XGO_PACKAGE) -go $(XGO_VERSION) -buildmode exe -dest $(DIST)/binaries -tags 'osusergo $(TAGS)' -ldflags '-linkmode external -extldflags "-static" $(LDFLAGS)' -targets 'windows/*' -out gitea-$(VERSION) .
CGO_CFLAGS="$(CGO_CFLAGS)" $(GO) run $(XGO_PACKAGE) -go $(XGO_VERSION) -buildmode exe -dest $(DIST)/binaries -tags 'osusergo $(TAGS)' -ldflags '-s -w -linkmode external -extldflags "-static" $(LDFLAGS)' -targets 'windows/*' -out gitea-$(VERSION) .
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why not put the common flags into LDFLAGS?

zjjhot added a commit to zjjhot/gitea that referenced this pull request Dec 31, 2024
* giteaofficial/main:
  Fix issue comment number (go-gitea#30556)
  Fix duplicate co-author in squashed merge commit messages (go-gitea#33020)
  Merge updatecommentattachment functions (go-gitea#33044)
  Move SetMerged to service layer (go-gitea#33045)
  Remove aws go sdk package dependency (go-gitea#33029)
  Fix settings not being loaded at CLI (go-gitea#26402)
  Refactor fixture loading for testing (go-gitea#33024)
  Use gitrepo.GetTreePathLatestCommit to get file lastest commit instead from latest commit cache (go-gitea#32987)
  Fix bug automerge cannot be chosed when there is only 1 merge style (go-gitea#33040)
  use `-s -w` ldflags for release artifacts (go-gitea#33041)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport/done All backports for this PR have been created backport/v1.23 This PR should be backported to Gitea 1.23 lgtm/done This PR has enough approvals to get merged. There are no important open reservations anymore. modifies/internal size/S Denotes a PR that changes 10-29 lines, ignoring generated files. skip-changelog This PR is irrelevant for the (next) changelog, for example bug fixes for unreleased features. topic/build PR changes how Gitea is built, i.e. regarding Docker or the Makefile
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Release build misses -s -w flag
5 participants