Comments (3)
It's installable via a cask, submitted a PR to distribute it via as a core package as well.
from go-james.
To distribute via homebrew-core, we need to distribute it as source.
See example: https://github.com/Homebrew/homebrew-core/blob/master/Formula/doctl.rb
class Doctl < Formula
desc "Command-line tool for DigitalOcean"
homepage "https://github.com/digitalocean/doctl"
url "https://github.com/digitalocean/doctl/archive/v1.43.0.tar.gz"
sha256 "a55cc30b7e2ab37604eead742da6966c2c6715734a229263c6acae2092a932a0"
head "https://github.com/digitalocean/doctl.git"
bottle do
cellar :any_skip_relocation
sha256 "c07547d09686eeaaefac0dca579704b346e389f7cebebe2a742eaae70b25070c" => :catalina
sha256 "6a4dbb027badefc29ae8f79cca9aeb6a2ee62208ef187e2084982b9ff667f8b0" => :mojave
sha256 "4b2f1ff61bc387125a9031664342926f8937c7159ce76ccf42f3fc7af7a5cad4" => :high_sierra
end
depends_on "go" => :build
def install
ENV["GOPATH"] = buildpath
doctl_version = version.to_s.split(/\./)
src = buildpath/"src/github.com/digitalocean/doctl"
src.install buildpath.children
src.cd do
base_flag = "-X github.com/digitalocean/doctl"
ldflags = %W[
#{base_flag}.Major=#{doctl_version[0]}
#{base_flag}.Minor=#{doctl_version[1]}
#{base_flag}.Patch=#{doctl_version[2]}
#{base_flag}.Label=release
].join(" ")
system "go", "build", "-ldflags", ldflags, "-o", bin/"doctl", "github.com/digitalocean/doctl/cmd/doctl"
end
(bash_completion/"doctl").write `#{bin}/doctl completion bash`
(zsh_completion/"_doctl").write `#{bin}/doctl completion zsh`
(fish_completion/"doctl.fish").write `#{bin}/doctl completion fish`
end
test do
assert_match "doctl version #{version}-release", shell_output("#{bin}/doctl version")
end
end
from go-james.
More tutorials:
- https://jonathanchang.org/blog/maintain-your-own-homebrew-repository-with-binary-bottles/
- https://github.com/Homebrew/homebrew-cask
- https://www.debian.org/doc/manuals/distribute-deb/distribute-deb.html
- https://wiki.alpinelinux.org/wiki/Creating_an_Alpine_package
from go-james.
Related Issues (20)
- Add option to publish docker image HOT 1
- Add option to recreate VSCode tasks file
- Check if we can create a task parser for VSCode
- Newly created repo cannot be pushed to GitHub
- Make the create options configurable
- Update the command to get the git revision
- Check if we can use the Docker API to create and upload the image HOT 1
- Add option to prune the images after doing a docker build
- Only keep remote docker tag after building
- Improve the way the revision is calculated
- Add docker-run command
- Integrate go-mod-outdated
- gobinaries.com
- github.com/kentik/pkg
- Run should use .env file in addition to the json file
- Add support for shell scripts for the post and pre build scripts
- Add --with-gitlab-ci flag HOT 1
- Please add a pre_build_example.go to inject a custom version HOT 3
- Log messages for the package command are messed up
- Add a sample github action file HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from go-james.