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

Keep linux binaries names short #331

Merged
merged 1 commit into from
Oct 5, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 22 additions & 0 deletions .goreleaser.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,18 @@ builds:
main: ./cli
binary: toxiproxy-cli-{{.Os}}-{{.Arch}}


- <<: *build_default
id: pkg-server
no_unique_dist_dir: false
binary: toxiproxy-server

- <<: *build_default
id: pkg-client
no_unique_dist_dir: false
main: ./cli
binary: toxiproxy-cli

checksum:
name_template: checksums.txt

Expand All @@ -56,6 +68,10 @@ nfpms:
maintainer: Shopify Opensource <opensource@shopify.com>
description: TCP proxy to simulate network and system conditions.
license: MIT
bindir: /usr/bin
builds:
- pkg-server
- pkg-client
formats:
- apk
- deb
Expand Down Expand Up @@ -132,6 +148,12 @@ archives:
id: archive_binaries
format: binary
name_template: "{{ .Binary }}"
builds:
- server
- client
-
id: archive_default
format: tar.gz
builds:
- pkg-server
- pkg-client
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
# [Unreleased]

* Update linux packages to use `/usr/bin` folder as binary destination and change the executable names to
exclude ARCH and OS names. New pathes:
```
/usr/bin/toxiproxy-cli
/usr/bin/toxiproxy-server
```
(#331, @miry)

# [2.1.7]

* Set the valid version during the build process.
Expand Down
19 changes: 17 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -35,10 +35,25 @@ release:

.PHONY: release-dry
release-dry:
goreleaser release --rm-dist --skip-publish --skip-validate

.PHONY: release-test
release-test: test bench e2e release-dry
version="$(shell git describe --abbrev=0 --tags)"
goreleaser build --rm-dist --single-target --skip-validate

docker run -v $(PWD)/dist:/dist --pull always --rm -it ubuntu bash -c "dpkg -i /dist/toxiproxy_*_linux_amd64.deb; ls -1 /usr/bin/toxiproxy-*; /usr/bin/toxiproxy-cli --version | grep \"toxiproxy-cli version $(version)\""
docker run -v $(PWD)/dist:/dist --pull always --rm -it centos bash -c "yum install -y /dist/toxiproxy_*_linux_amd64.rpm; ls -1 /usr/bin/toxiproxy-*; /usr/bin/toxiproxy-cli --version | grep \"toxiproxy-cli version $(version)\""
docker run -v $(PWD)/dist:/dist --pull always --rm -it alpine sh -c "apk add --allow-untrusted --no-cache /dist/toxiproxy_*_linux_amd64.apk; ls -1 /usr/bin/toxiproxy-*; /usr/bin/toxiproxy-cli --version | grep \"toxiproxy-cli version $(version)\""

tar -ztvf dist/toxiproxy_*_linux_amd64.tar.gz | grep toxiproxy-server
tar -ztvf dist/toxiproxy_*_linux_amd64.tar.gz | grep toxiproxy-cli

goreleaser build --rm-dist --single-target --skip-validate --id server
./dist/toxiproxy-server-* --help 2>&1 | grep "Usage of ./dist/toxiproxy-server"

goreleaser build --rm-dist --single-target --skip-validate --id client
./dist/toxiproxy-cli-* --version | grep "toxiproxy-cli version $(version)"
goreleaser release --rm-dist --skip-publish --skip-validate


.PHONY: setup
setup:
Expand Down