Skip to content

Commit cc45a0f

Browse files
committed
Fix binary name when using go get and fix homebrew release procedure.
Fixes: #27 Fixes: #30
1 parent e3ca61b commit cc45a0f

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

72 files changed

+113
-386
lines changed

Diff for: .github/workflows/release.yml

+2-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ name: goreleaser
33
on:
44
push:
55
tags:
6-
- '*'
6+
- 'v*'
77

88
jobs:
99
goreleaser:
@@ -40,6 +40,7 @@ jobs:
4040
args: release --rm-dist
4141
env:
4242
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
43+
HOMEBREW_TAP_GITHUB_TOKEN: ${{ secrets.HOMEBREW_TAP_GITHUB_TOKEN }}
4344
-
4445
name: Clear
4546
if: always()

Diff for: .goreleaser.yaml

+13-15
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ project_name: humioctl
22

33
builds:
44
- binary: humioctl
5+
main: ./cmd/humioctl
56
goos:
67
- windows
78
- darwin
@@ -16,16 +17,18 @@ release:
1617
owner: humio
1718
name: cli
1819

19-
#brews:
20-
# -
21-
# github:
22-
# owner: humio
23-
# name: homebrew-humio
24-
# folder: Formula
25-
# homepage: https://humio.com/
26-
# description: Manage and Stream Logs to Humio
27-
# test: |
28-
# system "echo DONE"
20+
brews:
21+
-
22+
tap:
23+
owner: humio
24+
name: homebrew-humio
25+
token: "{{ .Env.HOMEBREW_TAP_GITHUB_TOKEN }}"
26+
url_template: "https://github.com/humio/homebrew-humio/releases/download/{{ .Tag }}/{{ .ArtifactName }}"
27+
folder: Formula
28+
homepage: https://humio.com/
29+
description: Manage and Stream Logs to Humio
30+
test: |
31+
system "echo DONE"
2932
3033
archives:
3134
-
@@ -91,8 +94,3 @@ snapcrafts:
9194
# things they allow:
9295
# https://snapcraft.io/docs/reference/interfaces.
9396
plugs: ["home", "network"]
94-
95-
#dockers:
96-
# - image_templates:
97-
# - humio/cli:latest
98-
# - humio/cli:{{ .Tag }}

Diff for: CHANGELOG.md

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
See [https://github.com/humio/cli/releases](https://github.com/humio/cli/releases).

Diff for: CHANGES

-175
This file was deleted.

Diff for: Dockerfile

-5
This file was deleted.

Diff for: Makefile

+6-13
Original file line numberDiff line numberDiff line change
@@ -10,30 +10,23 @@ all: build
1010

1111
$(BIN_PATH): FORCE
1212
@echo "--> Building Humio CLI"
13-
go build -o $(BIN_PATH) main.go
13+
go build -o $(BIN_PATH) cmd/humioctl/*.go
1414

1515
build: $(BIN_PATH)
1616

17-
get:
18-
@echo "--> Fetching dependencies"
19-
go get
20-
21-
test:
22-
@echo "--> Testing"
23-
go test
24-
2517
clean:
2618
@echo "--> Cleaning"
2719
go clean
2820
@rm -rf bin/
2921

30-
dist: clean
31-
@echo "--> Tagging Git & Releasing"
32-
./scripts/dist.sh
22+
snapshot:
23+
@echo "--> Building snapshot"
24+
goreleaser build --rm-dist --snapshot
25+
@rm -rf bin/
3326

3427
run: $(BIN_PATH)
3528
$(BIN_PATH) $(CLI_COMMAND)
3629

37-
.PHONY: build get clean dist run FORCE
30+
.PHONY: build clean snapshot run FORCE
3831

3932
FORCE:

Diff for: README.md

+9
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,15 @@ $ sudo snap install humioctl
2727
```bash
2828
$ nix-env -i humioctl
2929
```
30+
### Any OS (via Go)
31+
32+
```bash
33+
$ go get github.com/humio/cli/cmd/humioctl
34+
```
35+
36+
### Manual installation
37+
38+
Download the latest release archive from the [releases](https://github.com/humio/cli/releases) page, unpack and enjoy!
3039

3140
## Usage
3241

Diff for: VERSION

-1
This file was deleted.

Diff for: cmd/alerts.go renamed to cmd/humioctl/alerts.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
// See the License for the specific language governing permissions and
1313
// limitations under the License.
1414

15-
package cmd
15+
package main
1616

1717
import (
1818
"github.com/spf13/cobra"

Diff for: cmd/alerts_export.go renamed to cmd/humioctl/alerts_export.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
// See the License for the specific language governing permissions and
1313
// limitations under the License.
1414

15-
package cmd
15+
package main
1616

1717
import (
1818
"fmt"

Diff for: cmd/alerts_install.go renamed to cmd/humioctl/alerts_install.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
// See the License for the specific language governing permissions and
1313
// limitations under the License.
1414

15-
package cmd
15+
package main
1616

1717
import (
1818
"fmt"

Diff for: cmd/alerts_list.go renamed to cmd/humioctl/alerts_list.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
// See the License for the specific language governing permissions and
1313
// limitations under the License.
1414

15-
package cmd
15+
package main
1616

1717
import (
1818
"fmt"

Diff for: cmd/alerts_remove.go renamed to cmd/humioctl/alerts_remove.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
// See the License for the specific language governing permissions and
1313
// limitations under the License.
1414

15-
package cmd
15+
package main
1616

1717
import (
1818
"fmt"

Diff for: cmd/cluster.go renamed to cmd/humioctl/cluster.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
// See the License for the specific language governing permissions and
1313
// limitations under the License.
1414

15-
package cmd
15+
package main
1616

1717
import (
1818
"github.com/spf13/cobra"

Diff for: cmd/cluster_nodes.go renamed to cmd/humioctl/cluster_nodes.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
// See the License for the specific language governing permissions and
1313
// limitations under the License.
1414

15-
package cmd
15+
package main
1616

1717
import (
1818
"github.com/spf13/cobra"

Diff for: cmd/cluster_nodes_list.go renamed to cmd/humioctl/cluster_nodes_list.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
// See the License for the specific language governing permissions and
1313
// limitations under the License.
1414

15-
package cmd
15+
package main
1616

1717
import (
1818
"sort"

Diff for: cmd/cluster_nodes_show.go renamed to cmd/humioctl/cluster_nodes_show.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
// See the License for the specific language governing permissions and
1313
// limitations under the License.
1414

15-
package cmd
15+
package main
1616

1717
import (
1818
"fmt"

Diff for: cmd/cluster_nodes_unregister.go renamed to cmd/humioctl/cluster_nodes_unregister.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
// See the License for the specific language governing permissions and
1313
// limitations under the License.
1414

15-
package cmd
15+
package main
1616

1717
import (
1818
"strconv"

0 commit comments

Comments
 (0)