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

Feat/delete component #47

Merged
merged 26 commits into from
Sep 21, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
db16f17
fix: barry 2024-09-13 10:27:36
kooksee Sep 13, 2024
b9957c3
fix: barry 2024-09-13 20:50:22
kooksee Sep 13, 2024
836ccbb
fix: barry 2024-09-13 21:57:58
kooksee Sep 13, 2024
5d6d73d
fix: barry 2024-09-13 21:58:03
kooksee Sep 13, 2024
939a762
fix: barry 2024-09-13 22:50:26
kooksee Sep 13, 2024
03135d8
fix: barry 2024-09-13 22:53:35
kooksee Sep 13, 2024
fe35107
fix: barry 2024-09-13 22:55:53
kooksee Sep 13, 2024
81bb65e
fix: barry 2024-09-14 14:32:19
kooksee Sep 14, 2024
09b1084
fix: barry 2024-09-14 15:00:30
kooksee Sep 14, 2024
b49a464
fix: barry 2024-09-14 15:13:49
kooksee Sep 14, 2024
4e6f042
fix: barry 2024-09-19 01:06:23
kooksee Sep 18, 2024
2b8131f
fix: barry 2024-09-19 01:09:46
kooksee Sep 18, 2024
bbb3e3c
fix: barry 2024-09-19 01:12:06
kooksee Sep 18, 2024
4d9b127
fix: barry 2024-09-19 01:22:17
kooksee Sep 18, 2024
4b7e662
fix: barry 2024-09-19 01:30:50
kooksee Sep 18, 2024
31524b7
fix: barry 2024-09-20 21:28:43
kooksee Sep 20, 2024
3186cc6
fix: barry 2024-09-20 23:31:06
kooksee Sep 20, 2024
b145b9e
fix: barry 2024-09-20 23:43:57
kooksee Sep 20, 2024
7fd4a6e
fix: barry 2024-09-21 01:20:40
kooksee Sep 20, 2024
6bd065e
fix: barry 2024-09-21 01:41:51
kooksee Sep 20, 2024
22c53e7
fix: barry 2024-09-21 01:50:25
kooksee Sep 20, 2024
287a621
fix: barry 2024-09-21 09:41:59
kooksee Sep 21, 2024
fddcf52
fix: barry 2024-09-21 11:55:05
kooksee Sep 21, 2024
ea8078d
fix: barry 2024-09-21 18:20:51
kooksee Sep 21, 2024
aef6d8c
fix: barry 2024-09-21 19:43:29
kooksee Sep 21, 2024
d6b98ed
fix: barry 2024-09-21 19:51:06
kooksee Sep 21, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 25 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
name: Release
on:
push:
tags: ["v*.*.*"]

jobs:
release:
name: Release on GitHub
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Set up Go
uses: actions/setup-go@v5
with:
cache-dependency-path: "**/*.sum"
- name: Run GoReleaser
uses: goreleaser/goreleaser-action@v5
with:
version: latest
args: release --clean
env:
GITHUB_TOKEN: ${{ secrets.TOKEN }}
13 changes: 9 additions & 4 deletions .goreleaser.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
builds:
- main: ./cmds/lava/main.go
- main: ./cmds/protoc-gen-lava/main.go
id: protoc-gen-lava
binary: protoc-gen-lava
goos:
- linux
- darwin
- windows
- main: ./main.go
id: lava
binary: lava
env:
Expand All @@ -8,8 +15,6 @@ builds:
- linux
- darwin
- windows
goarch:
- amd64
ldflags:
- -X 'github.com/pubgo/lava/version.BuildTime={{ .Date }}'
- -X 'github.com/pubgo/lava/version.CommitID={{ .Commit }}'
Expand All @@ -18,4 +23,4 @@ archives:
- name_template: "{{ .Binary }}-{{ .Tag }}-{{ .Os }}-{{ .Arch }}"
format: binary
replacements:
amd64: x86_64
amd64: x86_64
3 changes: 3 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -45,3 +45,6 @@ protobuf:
lint:
golangci-lint --version
golangci-lint run --timeout 3m --verbose ./...

install-protoc:
go install -v ./cmds/protoc-gen-lava
27 changes: 27 additions & 0 deletions buildtasks/bench.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
package buildtasks

import "fmt"

type BenchMode int

const (
BenchModeWazero BenchMode = iota
BenchModeCGO
BenchModeDefault
)

func BenchArgs(pkg string, count int, mode BenchMode, libName string) []string {
args := []string{"test", "-bench=.", "-run=^$", "-v", "-timeout=60m"}
if count > 0 {
args = append(args, fmt.Sprintf("-count=%d", count))
}
switch mode {
case BenchModeCGO:
args = append(args, fmt.Sprintf("-tags=%s_cgo", libName))
case BenchModeDefault:
args = append(args, fmt.Sprintf("-tags=%s_bench_default", libName))
}
args = append(args, pkg)

return args
}
17 changes: 17 additions & 0 deletions buildtasks/lint.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
package buildtasks

import (
"github.com/goyek/goyek/v2"
"github.com/goyek/x/cmd"
)

var GoLint = goyek.Define(goyek.Task{
Name: "go-lint",
Usage: "golangci-lint run --fix",
Action: func(a *goyek.A) {
if !cmd.Exec(a, "go install github.com/golangci/golangci-lint/cmd/golangci-lint@latest") {
return
}
cmd.Exec(a, "golangci-lint run --fix")
},
})
23 changes: 23 additions & 0 deletions buildtasks/util.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
package buildtasks

import (
"os/exec"

"github.com/goyek/goyek/v2"
"github.com/goyek/x/cmd"
)

// check if docker is installed and running
func checkDocker(a *goyek.A) bool {
if !hasBinary("docker") {
return true
}

return cmd.Exec(a, "docker ps")
}

// check if a binary exists
func hasBinary(binaryName string) bool {
_, err := exec.LookPath(binaryName)
return err == nil
}
135 changes: 0 additions & 135 deletions cmds/protoc-gen-cloud-job/internal/gen.go

This file was deleted.

24 changes: 0 additions & 24 deletions cmds/protoc-gen-cloud-job/main.go

This file was deleted.

Loading
Loading