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

init: Bootstrap project #1

Merged
merged 4 commits into from
Aug 7, 2024
Merged

init: Bootstrap project #1

merged 4 commits into from
Aug 7, 2024

Conversation

camh-
Copy link
Member

@camh- camh- commented Aug 2, 2024

Bootstrap the project bu installing the standard foxygoat tooling for
Go programs:

  • Go 1.22
  • golangci-lint
  • hermit
  • gh
  • make

Use the standard Makefile tool configs, mostly copied from
foxygoat/offscreen, but add a new way of doing GitHub releases
instead of using goreleaser.

Use the MIT license - it's simpler than Apache 2.0

camh- added 3 commits August 2, 2024 13:15
License this project under the MIT license. Foxygoat projects are
usually Apache 2.0, but MIT is much the same for practical intents but
much shorter.
Initialise repository with hermit by running:

    hermit init --no-git

Link: https://cashapp.github.io/hermit/
Add the initial README describing the purpose of `git-credential-fdoss`.
Further info will be added as code is added to the repo.
@camh- camh- requested a review from juliaogris August 2, 2024 04:17
Copy link
Member

@juliaogris juliaogris left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm with comments.

README.md Show resolved Hide resolved
Makefile Outdated Show resolved Hide resolved
@camh- camh- force-pushed the init-repo branch 3 times, most recently from bcd0d35 to bc4d4e1 Compare August 4, 2024 13:15
@camh-
Copy link
Member Author

camh- commented Aug 4, 2024

I've revved this PR to remove goreleaser and implement make release in the Makefile. For this, I am using .WAIT in the release target which requires GNU Make 4.4 or later, so I also updated the make check at the end of the Makefile for this.

Copy link
Member

@juliaogris juliaogris left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

NEAT! 🎄

Bootstrap the project with a bare-bones `main.go` with all the tooling
configured:

    hermit install gh go golangci-lint make
    go mod init foxygo.at/offscreen

Use the standard foxygoat `Makefile` for Go projects (copied from
`offscreen`) and update slightly for manually creating releases (no
longer using goreleaser) and doing multi-architecture builds.

The `install` target has been removed as `make install` is expected to
install system-wide, but hermit overrides `$GOBIN` so the binary only
gets installed inside a repo temp directory. This is not helpful so the
target has been removed.

Configure `golangci-lint` with specific linters disabled, but all others
enabled.

Configure GitHub Actions for CI/CD.

Install `gh` to create releases, and create release binaries for 4 common linux
architectures - amd64, arm64, 386 and arm. We do not build binaries for
other OSes as they don't run DBus.
@camh-
Copy link
Member Author

camh- commented Aug 7, 2024

I've pushed a few more minor changes to the Makefile (removing the install target [see commit message for reasoning], and reorganising the binary naming stuff, perhaps unnecessarily 🤷). I'm going to merge now.

@camh- camh- merged commit 905bccd into master Aug 7, 2024
3 checks passed
@camh- camh- deleted the init-repo branch August 7, 2024 07:55
@camh- camh- restored the init-repo branch August 7, 2024 08:03
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.

2 participants