Skip to content

Commit c6ebe0a

Browse files
committed
Update GoReleaser config to not use deprecated options
- Re-order the top-level keys in the config file so that there's some method to the madness. - Install an up-to-date version into our containers by following the instructions at https://goreleaser.com/install/#yum-repository. The GitHub Actions currently use 2.13.3, which is the latest release. The containers have been using 2.5.1, due to bad repo config, which is old enough to not be compatible with the fixes for the deprecation warnings.
1 parent 41ffa9d commit c6ebe0a

File tree

2 files changed

+43
-29
lines changed

2 files changed

+43
-29
lines changed

.goreleaser.yml

Lines changed: 37 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# ***************************************************************
22
#
3-
# Copyright (C) 2025, Pelican Project, Morgridge Institute for Research
3+
# Copyright (C) 2026, Pelican Project, Morgridge Institute for Research
44
#
55
# Licensed under the Apache License, Version 2.0 (the "License"); you
66
# may not use this file except in compliance with the License. You may
@@ -19,14 +19,38 @@
1919
project_name: pelican
2020
version: 2
2121

22+
#---------------------------------------------------------------------------
23+
# Configure the release process.
24+
2225
release:
26+
# Mark each new release as a pre-release.
2327
prerelease: true
28+
checksum:
29+
# Use a simpler name for the checksums file, compared to the default.
30+
name_template: "checksums.txt"
31+
changelog:
32+
sort: asc
33+
filters:
34+
exclude:
35+
- "^docs:"
36+
- "^test:"
37+
- "Merge branch"
38+
- "Merge pull request"
39+
40+
#---------------------------------------------------------------------------
41+
# Configure the build process.
42+
43+
snapshot:
44+
# The container images install snapshot builds.
45+
# Override the default template, which includes extra cruft.
46+
version_template: "{{ .Version }}"
2447

2548
before:
2649
hooks:
2750
- go mod tidy
2851
- go generate ./...
2952
- make web-build
53+
3054
builds:
3155
- &build-pelican
3256
id: pelican
@@ -37,9 +61,9 @@ builds:
3761
- windows
3862
- darwin
3963
goarch:
40-
- "amd64"
41-
- "arm64"
42-
- "ppc64le"
64+
- amd64
65+
- arm64
66+
- ppc64le
4367
dir: ./cmd
4468
binary: pelican
4569
tags:
@@ -74,8 +98,8 @@ builds:
7498
goos:
7599
- linux
76100
goarch:
77-
- "amd64"
78-
- "arm64"
101+
- amd64
102+
- arm64
79103
dir: ./cmd
80104
binary: pelican-server
81105
tags:
@@ -89,7 +113,7 @@ builds:
89113
# builds into separate archives.
90114
archives:
91115
- id: pelican
92-
builds:
116+
ids:
93117
- pelican
94118
name_template: >-
95119
{{ .ProjectName }}_
@@ -98,35 +122,23 @@ archives:
98122
{{- else }}{{ .Arch }}{{ end }}
99123
format_overrides:
100124
- goos: windows
101-
format: zip
125+
formats: [zip]
102126
wrap_in_directory: '{{ .ProjectName }}-{{ trimsuffix .Version "-next" }}'
103127
- id: pelican-server
104-
builds:
128+
ids:
105129
- pelican-server
106130
name_template: >-
107131
{{ .ProjectName }}-server_
108132
{{- title .Os }}_
109133
{{- if eq .Arch "amd64" }}x86_64
110134
{{- else }}{{ .Arch }}{{ end }}
111135
wrap_in_directory: '{{ .ProjectName }}-server-{{ trimsuffix .Version "-next" }}'
112-
checksum:
113-
name_template: "checksums.txt"
114-
snapshot:
115-
version_template: "{{ .Version }}"
116-
changelog:
117-
sort: asc
118-
filters:
119-
exclude:
120-
- "^docs:"
121-
- "^test:"
122-
- Merge pull request
123-
- Merge branch
124136

125137
nfpms:
126138
- &package-pelican
127139
id: pelican
128140
package_name: pelican
129-
builds:
141+
ids:
130142
- pelican
131143
# Note that git tags like v7.0.0-rc.1 will be modified by goreleaser when building
132144
# rpms to be v7.0.0~rc.1-1. The tilde is a special character in RPM versioning that
@@ -276,7 +288,7 @@ nfpms:
276288
- <<: *package-pelican
277289
id: pelican-debug
278290
package_name: pelican-debug
279-
builds:
291+
ids:
280292
- pelican-debug
281293
description: Command-line copy tool for the Open Science Data Federation (includes debug symbols)
282294
formats:
@@ -290,7 +302,7 @@ nfpms:
290302

291303
- id: pelican-osdf-compat
292304
package_name: pelican-osdf-compat
293-
builds: []
305+
ids: []
294306
file_name_template: "{{ .ConventionalFileName }}"
295307
vendor: OSG Consortium
296308
homepage: https://pelicanplatform.org
@@ -382,7 +394,7 @@ nfpms:
382394

383395
- id: pelican-server
384396
package_name: pelican-server
385-
builds:
397+
ids:
386398
- pelican-server
387399
file_name_template: "{{ .ConventionalFileName }}"
388400
vendor: OSG Consortium

images/Dockerfile

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -126,6 +126,7 @@ RUN --mount=type=bind,source=go.mod,target=/context/go.mod \
126126
baseurl=https://repo.goreleaser.com/yum/
127127
enabled=1
128128
gpgcheck=0
129+
exclude=goreleaser-pro
129130
EOF
130131
dnf install -y goreleaser jq make
131132

@@ -205,7 +206,7 @@ RUN --mount=type=cache,id=go-cache,target=/root/.cache/go-build,sharing=shared \
205206
elif [ "$TARGETARCH" = "arm64" ]; then
206207
VARIANT="v8.0"
207208
fi
208-
for dir in ${PWD}/dist/${TARGETOS}_${TARGETARCH}/*${TARGETOS}_${TARGETARCH}*; do
209+
for dir in ${PWD}/dist/*${TARGETOS}_${TARGETARCH}*; do
209210
ln -s ${dir} ${dir%_${VARIANT}}
210211
done
211212
ENDRUN
@@ -664,7 +665,7 @@ ENDRUN
664665
#################################################################
665666
FROM pelican-software-base AS central-services-base
666667
ARG TARGETOS TARGETARCH
667-
COPY --from=pelican-build /pelican-build/dist/${TARGETOS}_${TARGETARCH}/pelican-server_${TARGETOS}_${TARGETARCH}/pelican-server /usr/local/sbin/pelican-server
668+
COPY --from=pelican-build /pelican-build/dist/pelican-server_${TARGETOS}_${TARGETARCH}/pelican-server /usr/local/sbin/pelican-server
668669
COPY images/entrypoint.sh /entrypoint.sh
669670

670671
FROM central-services-base AS director
@@ -692,7 +693,7 @@ CMD ["serve"]
692693
#################################################################
693694
FROM origin-software-base AS origin
694695
ARG TARGETOS TARGETARCH
695-
COPY --from=pelican-build /pelican-build/dist/${TARGETOS}_${TARGETARCH}/pelican-server_${TARGETOS}_${TARGETARCH}/pelican-server /usr/local/sbin/pelican-server
696+
COPY --from=pelican-build /pelican-build/dist/pelican-server_${TARGETOS}_${TARGETARCH}/pelican-server /usr/local/sbin/pelican-server
696697
COPY images/entrypoint.sh /entrypoint.sh
697698
ENTRYPOINT ["/entrypoint.sh", "pelican-server", "origin"]
698699
CMD ["serve"]
@@ -720,7 +721,7 @@ CMD ["serve"]
720721
#################################################################
721722
FROM xrootd-software-base AS cache
722723
ARG TARGETOS TARGETARCH
723-
COPY --from=pelican-build /pelican-build/dist/${TARGETOS}_${TARGETARCH}/pelican-server_${TARGETOS}_${TARGETARCH}/pelican-server /usr/local/sbin/pelican-server
724+
COPY --from=pelican-build /pelican-build/dist/pelican-server_${TARGETOS}_${TARGETARCH}/pelican-server /usr/local/sbin/pelican-server
724725
COPY images/entrypoint.sh /entrypoint.sh
725726
ENTRYPOINT ["/entrypoint.sh", "pelican-server", "cache"]
726727
CMD ["serve"]
@@ -799,6 +800,7 @@ RUN --mount=type=bind,source=go.mod,target=/context/go.mod \
799800
baseurl=https://repo.goreleaser.com/yum/
800801
enabled=1
801802
gpgcheck=0
803+
exclude=goreleaser-pro
802804
EOF
803805
dnf install -y goreleaser jq make
804806

0 commit comments

Comments
 (0)