You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I want to build multiple versions of my product using GoReleaser. My goal is to use a common schema with GoReleaser defaults and specific overrides for each version of my product, such as "community" and "enterprise". Ideally, I'd like to use the GoReleaser JSON schema for basic constraints, enforced by common constraints, and filled with data specific to each product version.
Here's what I've done so far:
Generated the CUE schema from the GoReleaser JSON schema using:
product: goreleaser.#goreleaser& {
version: 2report_sizes: true// fill some common data shared by all goreleaser tasks
}
Content of community.cue:
packagecommunityimport"github.com/corp/product/schemas/goreleaser/product:product"community: product& {
release: {
header: product.release.header+"woo"// final data for app modification
}
}
Command used to generate GoReleaser YAML:
.tool/cue export -f \
schemas/goreleaser/products/mods/community.cue \
-o gen/cue/goreleaser/goreleaser_community.yaml -e community
However, the resulting YAML contains unexpected entries outside the scope:
release:
header: |- ## product {{ .Tag }} Release ({{ .Date }}) Welcome to this new release!wooproduct:
version: 2report_sizes: truegitlab_urls:
...
Am I doing this correctly? Is there a better pattern to generate multiple GoReleaser configs with shared common parts and specific data for each app version?
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Hi!
I want to build multiple versions of my product using GoReleaser. My goal is to use a common schema with GoReleaser defaults and specific overrides for each version of my product, such as "community" and "enterprise". Ideally, I'd like to use the GoReleaser JSON schema for basic constraints, enforced by common constraints, and filled with data specific to each product version.
Here's what I've done so far:
Generated the CUE schema from the GoReleaser JSON schema using:
Organized the folder layout:
Here's the content of
product.cue
:Content of
community.cue
:Command used to generate GoReleaser YAML:
.tool/cue export -f \ schemas/goreleaser/products/mods/community.cue \ -o gen/cue/goreleaser/goreleaser_community.yaml -e community
However, the resulting YAML contains unexpected entries outside the scope:
Am I doing this correctly? Is there a better pattern to generate multiple GoReleaser configs with shared common parts and specific data for each app version?
Thank you!
Beta Was this translation helpful? Give feedback.
All reactions