Skip to content
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
7 changes: 6 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,11 @@ DEV_VERSION = $(DEV_BASE)-dev.$(shell git rev-parse --short=7 HEAD)
# for the binary fly-<os>-<arch> in it, so do not change these names.
RELEASE_PLATFORMS := linux/amd64 linux/arm64

# Release archives hold the binary as root:root, not as the user who built
# it: an installer that keeps the owner must not give the binary to a user.
# GNU tar (CI) and bsdtar (macOS) name the options differently.
TAR_OWNER := $(shell tar --version 2>/dev/null | grep -q GNU && echo '--owner=0 --group=0 --numeric-owner' || echo '--uid 0 --gid 0 --numeric-owner')

# "go run pkg@version" builds each tool with the Go version of this module,
# so a tool cannot be older than go.mod.
GOLANGCI_LINT := go run github.com/golangci/golangci-lint/v2/cmd/golangci-lint@v2.13.2
Expand Down Expand Up @@ -62,7 +67,7 @@ release: ## Build the static release archives and checksums.txt in build/
os=$${platform%/*}; arch=$${platform#*/}; out=$(BINARY)-$$os-$$arch; \
echo "Building $$out ($(VERSION))"; \
CGO_ENABLED=0 GOOS=$$os GOARCH=$$arch go build -trimpath -ldflags "-s -w $(LDFLAGS)" -o build/$$out . || exit 1; \
COPYFILE_DISABLE=1 tar -czf build/$$out.tar.gz -C build $$out || exit 1; \
COPYFILE_DISABLE=1 tar $(TAR_OWNER) -czf build/$$out.tar.gz -C build $$out || exit 1; \
done
cd build && (command -v sha256sum >/dev/null 2>&1 && sha256sum *.tar.gz || shasum -a 256 *.tar.gz) > checksums.txt

Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ Conforms to the FlyWP monitoring agent contract v0.2.1.
You can easily install the `fly` CLI tool using the following command. This will download and run the `install.sh` script, which will automatically detect your operating system and architecture, download the latest release, and install it to `/usr/local/bin`:

```bash
curl -sL https://raw.githubusercontent.com/flywp/server-cli/main/install.sh | sudo bash
curl -fsSL https://raw.githubusercontent.com/flywp/server-cli/main/install.sh | sudo bash
```

<details>
Expand Down
Loading
Loading