Skip to content

build: add a Makefile for the build, test, lint and release commands - #23

Merged
nabil1440 merged 1 commit into
blockers/8-self-updatefrom
blockers/16-makefile
Sep 22, 2026
Merged

nabil1440 merged 1 commit into
blockers/8-self-updatefrom
blockers/16-makefile

Conversation

@nabil1440

@nabil1440 nabil1440 commented Sep 21, 2026 •

Copy link
Copy Markdown
Contributor

Change

  • A Makefile adds these targets: build, test, vet, lint, vuln, fmt, fmt-check, check, release, clean and help. The targets follow the migration-agent repository.
  • make build makes bin/fly with the version, the commit and the date from git.
  • make lint and make vuln run fixed tool versions through go run. Thus Go builds the tools with the Go version of this module.
  • make check runs fmt-check, vet, lint, test and vuln. It is the local gate before each merge, because the team skipped enhancement(ci): add checks for pull requests and replace the archived release actions #7.
  • make release makes the static linux/amd64 and linux/arm64 archives and build/checksums.txt. VERSION replaces the version from git.
  • build.sh is now a wrapper for make release. Thus the release workflow does not change.
  • The README documents the targets.

Caution

CAUTION: DO NOT CHANGE THE NAMES OR THE CONTENTS OF THE RELEASE ASSETS. IF YOU CHANGE THEM, THE INSTALLED CLIS CANNOT RUN fly update.

  • make release makes the same archive names and contents as the build.sh before this PR.

Tests

  • make release VERSION=v9.9.9 on macOS (GNU Make 3.81):
    • The archive names and entries are the same as the output of the old build.sh. The files in build/ are also the same.
    • shasum -c checksums.txt passes.
    • file shows two static, stripped binaries.
    • The arm64 binary shows fly-cli version v9.9.9.
  • ./build.sh in a golang:1.27 linux/amd64 container (GNU Make 4.4.1) makes static binaries, and the checksums agree.
  • make build: bin/fly version shows the git version.
  • make check passes: 0 lint issues, all tests pass, no vulnerabilities.
  • make fmt-check fails when a file is not formatted.

Closes #16

@nabil1440
nabil1440 added this pull request to stack #24 September 21, 2026 10:41
- make build, test, vet, lint, vuln, fmt, fmt-check, check, release,
  clean and help, in the style of migration-agent.
- lint and vuln run pinned tool versions through go run, so the tools
  are built with the Go version of this module.
- make check is the local gate before each merge (CI is skipped, #7).
- make release makes the same archives as build.sh before, plus
  build/checksums.txt. build.sh is now a wrapper for make release, so
  the release workflow does not change.
- README: document the targets.

Closes #16
@nabil1440
nabil1440 merged commit f5969fc into develop Sep 22, 2026
@nabil1440
nabil1440 deleted the blockers/16-makefile branch September 22, 2026 06:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

enhancement: Add a Makefile for the build, test, lint and release commands

1 participant