Skip to content

Commit a471e32

Browse files
authored
release: Remove v prefix from binaries and path (#152)
This change removes the v prefix for all of the artifacts created from goreleaser and also from the path where the artifacts are then uploaded to. Additionally fixes a bug which was calling the release post actions on goreleaser's snapshot command and an erroneous path since the script is called by the root Makefile Signed-off-by: Marc Lopez <marc5.12@outlook.com>
1 parent fb724ec commit a471e32

File tree

3 files changed

+7
-5
lines changed

3 files changed

+7
-5
lines changed

.goreleaser.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ builds:
2727
binary: ecctl
2828
lang: go
2929
archives:
30-
- name_template: '{{ .ProjectName }}_{{ .Env.VERSION }}_{{ .Os }}_{{ .Arch }}{{ if .Arm}}v{{ .Arm }}{{ end }}'
30+
- name_template: '{{ .ProjectName }}_{{ .Version }}_{{ .Os }}_{{ .Arch }}{{ if .Arm}}v{{ .Arm }}{{ end }}'
3131
format: tar.gz
3232
files:
3333
- LICENSE*
@@ -36,7 +36,7 @@ archives:
3636
snapshot:
3737
name_template: SNAPSHOT-{{ .Commit }}
3838
nfpms:
39-
- file_name_template: "{{ .ProjectName }}_{{ .Env.VERSION }}_{{ .Os }}_{{ .Arch }}"
39+
- file_name_template: "{{ .ProjectName }}_{{ .Version }}_{{ .Os }}_{{ .Arch }}"
4040
license: Apache 2.0
4141
replacements:
4242
amd64: 64-bit
@@ -45,5 +45,5 @@ nfpms:
4545
- deb
4646
- rpm
4747
checksum:
48-
name_template: '{{ .ProjectName }}_{{ .Env.VERSION }}_checksums.txt'
48+
name_template: '{{ .ProjectName }}_{{ .Version }}_checksums.txt'
4949
dist: dist

scripts/goreleaser

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,4 +29,6 @@ docker run --rm -ti --privileged \
2929
-w "/go/src/github.com/${OWNER}/${REPO}" ecctl:goreleaser ${*}
3030

3131
# Run post actions
32-
./goreleaser-post-actions.sh ${VERSION}
32+
if [[ ${1} != "snapshot" ]]; then
33+
./scripts/goreleaser-post-actions.sh ${VERSION}
34+
fi

scripts/goreleaser-post-actions.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ VERSION=${1}
88
# Upload the binaries and the checksums.
99
for f in dist/*.{tar.gz,deb,rpm,txt}; do
1010
aws --profile ecsecurity s3 cp --acl bucket-owner-full-control \
11-
${f} s3://download.elasticsearch.org/downloads/ecctl/${VERSION}/
11+
${f} s3://download.elasticsearch.org/downloads/ecctl/$(echo ${VERSION}| sed 's/^v//')/
1212
done
1313

1414
# Create the actual Github Release.

0 commit comments

Comments
 (0)