restructure

This commit is contained in:
yanghao05
2023-04-20 12:11:42 +08:00
parent 5b8eca5d87
commit c35644377a
4 changed files with 0 additions and 66 deletions

View File

@@ -1,39 +0,0 @@
buildAt=`date +%Y/%m/%d-%H:%M:%S`
gitHash=`git rev-parse HEAD`
version=`git rev-parse --abbrev-ref HEAD | grep -v HEAD || git describe --exact-match HEAD || git rev-parse HEAD` ## todo: use current release git tag
flags="-X 'atom/utils.Version=${version}' -X 'atom/utils.BuildAt=${buildAt}' -X 'atom/utils.GitHash=${gitHash}'"
GOPATH:=$(shell go env GOPATH)
.PHONY: tidy
tidy:
@go mod tidy
.PHONY: dist
dist:
@go build -ldflags=${flags} -o bin/atom
@cp config.toml bin/
.PHONY: test
test:
@go test -v ./... -cover
.PHONY: lint
lint:
@golangci-lint run
.PHONY: proto
proto:
@buf generate
.PHONY: mup
mup:
@go run . migrate up
.PHONY: mdown
mdown:
@go run . migrate down
.PHONY: model
model:
@go run . model

View File

@@ -1,9 +0,0 @@
version: v1
plugins:
- name: go
out: ./
opt: paths=source_relative
# - name: micro
# out: ./
# opt:
# - paths=source_relative

View File

@@ -1,9 +0,0 @@
version: v1
lint:
use:
- DEFAULT
except:
- PACKAGE_VERSION_SUFFIX
breaking:
use:
- FILE

View File

@@ -1,9 +0,0 @@
package main
import (
"github.com/rogeecn/atom/cmd"
)
func main() {
cmd.Execute()
}