Skip to content

Commit

Permalink
Merge branch 'main' into bugfix/utility-updates
Browse files Browse the repository at this point in the history
  • Loading branch information
lleadbet committed Apr 16, 2021
2 parents 121dfcc + c67cbc1 commit 7cf9c1f
Show file tree
Hide file tree
Showing 2 changed files with 34 additions and 1 deletion.
26 changes: 25 additions & 1 deletion .goreleaser.yml
Original file line number Diff line number Diff line change
Expand Up @@ -63,10 +63,34 @@ brews:
folder: Formula
homepage: https://github.com/twitchdev/twitch-cli
description: CLI for Twitch's developer offerings
custom_block: |
if OS.mac? && Hardware::CPU.arm?
url "https://github.com/twitchdev/twitch-cli.git", tag: "{{ .Tag }}"
depends_on "go" => :build
end
head "https://github.com/twitchdev/twitch-cli.git", branch: "main"
head do
depends_on "go" => :build
end
install: |
v = version
if build.head?
v = "head"
ldflags = "-X main.buildVersion=#{v}"
system "go", "build", "-ldflags=#{ldflags}"
mv "twitch-cli", "twitch"
end
if OS.mac? && Hardware::CPU.arm?
ldflags = "-X main.buildVersion=#{v}"
system "go", "build", "-ldflags=#{ldflags}"
mv "twitch-cli", "twitch"
end
bin.install "twitch"
test: |
system "#{bin}/twitch -v"
system "#{bin}/twitch", "version"
license: Apache-2.0
archives:
- replacements:
Expand Down
9 changes: 9 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,15 @@ release:
-e GITHUB_TOKEN=${GITHUB_TOKEN} \
twitch-cli:latest --rm-dist

test-release:
docker build . -t twitch-cli:latest
docker run --rm --privileged \
-v $$PWD:/go/src/github.com/twitchdev/twitch-cli \
-v /var/run/docker.sock:/var/run/docker.sock \
-w /go/src/github.com/twitchdev/twitch-cli \
-e GITHUB_TOKEN=${GITHUB_TOKEN} \
twitch-cli:latest --rm-dist --skip-publish --snapshot

build:
go build --ldflags "-X main.buildVersion=source"

Expand Down

0 comments on commit 7cf9c1f

Please sign in to comment.