-
-
Notifications
You must be signed in to change notification settings - Fork 39
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
Support omitting {{.Format}}
in Asset
and provide the variable AssetWithoutExt
#1774
Labels
enhancement
New feature or request
Milestone
Comments
if format != "raw" && format != "" && ! strings.HasSuffix(asset, fmt.Sprintf(".%s", format)) {
asset = fmt.Sprintf("%s.%s", asset, format)
} if format == "raw" {
AssetWithoutExt := asset
} else {
AssetWithoutExt := strings.TrimSuffix(asset, fmt.Sprintf(".%s", format))
} |
|
Hmm. This is a breaking change.
packages:
- type: github_release
repo_owner: aristocratos
repo_name: btop
description: A monitor of resources
asset: btop-{{.Arch}}-{{.OS}}.tbz
format: tar.bz2
supported_envs:
- darwin
- linux
replacements:
linux: linux-musl
darwin: macos-monterey
amd64: x86_64
overrides:
- goos: linux
replacements:
arm64: aarch64
version_constraint: semver(">= 1.2.13")
files:
- name: btop
src: btop/bin/btop
version_overrides:
- version_constraint: "true"
files:
- name: btop
src: bin/btop |
Resolved. aabaf21 |
Closed
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Feature Overview
Support omitting
{{.Format}}
inAsset
and provide the variableAssetWithoutExt
Why is the feature needed?
To make the configuration simple.
This is useful when the format is changed from
raw
totar.gz
or something.Does the feature include Breaking Changes?
No.
Example Code
Example 1.
AS IS
TO BE
Example 2.
AS IS
TO BE
The text was updated successfully, but these errors were encountered: