mirror of
https://github.com/crawlab-team/crawlab.git
synced 2026-01-22 17:31:03 +01:00
added Taskfile.yml
This commit is contained in:
12
backend/.editorconfig
Normal file
12
backend/.editorconfig
Normal file
@@ -0,0 +1,12 @@
|
||||
root = true
|
||||
|
||||
[*]
|
||||
charset = utf-8
|
||||
end_of_line = lf
|
||||
indent_size = 4
|
||||
indent_style = tab
|
||||
insert_final_newline = true
|
||||
trim_trailing_whitespace = true
|
||||
|
||||
[{*.yml, *.yaml, *.json}]
|
||||
indent_size = 2
|
||||
@@ -1,32 +0,0 @@
|
||||
SHELL := /bin/bash
|
||||
BASEDIR = $(shell pwd)
|
||||
|
||||
# build with verison infos
|
||||
versionDir = "apiserver/pkg/version"
|
||||
gitTag = $(shell if [ "`git describe --tags --abbrev=0 2>/dev/null`" != "" ];then git describe --tags --abbrev=0; else git log --pretty=format:'%h' -n 1; fi)
|
||||
buildDate = $(shell TZ=Asia/Shanghai date +%FT%T%z)
|
||||
gitCommit = $(shell git log --pretty=format:'%H' -n 1)
|
||||
gitTreeState = $(shell if git status|grep -q 'clean';then echo clean; else echo dirty; fi)
|
||||
|
||||
ldflags="-w -X ${versionDir}.gitTag=${gitTag} -X ${versionDir}.buildDate=${buildDate} -X ${versionDir}.gitCommit=${gitCommit} -X ${versionDir}.gitTreeState=${gitTreeState}"
|
||||
|
||||
all: gotool
|
||||
@go build -v -ldflags ${ldflags} .
|
||||
clean:
|
||||
rm -f apiserver
|
||||
find . -name "[._]*.s[a-w][a-z]" | xargs -i rm -f {}
|
||||
gotool:
|
||||
gofmt -w .
|
||||
go tool vet . |& grep -v vendor;true
|
||||
ca:
|
||||
openssl req -new -nodes -x509 -out conf/server.crt -keyout conf/server.key -days 3650 -subj "/C=DE/ST=NRW/L=Earth/O=Random Company/OU=IT/CN=127.0.0.1/emailAddress=xxxxx@qq.com"
|
||||
|
||||
help:
|
||||
@echo "make - compile the source code"
|
||||
@echo "make clean - remove binary file and vim swp files"
|
||||
@echo "make gotool - run go tool 'fmt' and 'vet'"
|
||||
@echo "make ca - generate ca files"
|
||||
|
||||
.PHONY: clean gotool ca help
|
||||
|
||||
|
||||
12
backend/Taskfile.yml
Normal file
12
backend/Taskfile.yml
Normal file
@@ -0,0 +1,12 @@
|
||||
version: '3'
|
||||
|
||||
tasks:
|
||||
dev:
|
||||
desc: Switch to dev mode for local development.
|
||||
cmds:
|
||||
- cp -f go.mod.dev go.mod
|
||||
|
||||
deploy:
|
||||
desc: Switch to deploy mode for code publish.
|
||||
cmds:
|
||||
- echo 'not implemented'
|
||||
20
backend/go.mod.dev
Normal file
20
backend/go.mod.dev
Normal file
@@ -0,0 +1,20 @@
|
||||
module crawlab
|
||||
|
||||
go 1.16
|
||||
|
||||
replace (
|
||||
github.com/crawlab-team/crawlab-core => ../../crawlab-core
|
||||
github.com/crawlab-team/crawlab-vcs => ../../crawlab-vcs
|
||||
github.com/crawlab-team/crawlab-fs => ../../crawlab-fs
|
||||
github.com/crawlab-team/crawlab-db => ../../crawlab-db
|
||||
)
|
||||
|
||||
require (
|
||||
github.com/apex/log v1.9.0
|
||||
github.com/crawlab-team/crawlab-core v0.6.0-beta.20211230.1200
|
||||
github.com/crawlab-team/go-trace v0.1.1
|
||||
github.com/gin-gonic/gin v1.7.1
|
||||
github.com/spf13/cobra v1.1.3
|
||||
github.com/spf13/viper v1.7.1
|
||||
go.uber.org/dig v1.10.0
|
||||
)
|
||||
@@ -3,16 +3,18 @@ module crawlab
|
||||
go 1.16
|
||||
|
||||
replace (
|
||||
github.com/crawlab-team/crawlab-core => /Users/chenjingyang/dev/my-job/gitee/crawlab-core
|
||||
github.com/crawlab-team/goseaweedfs => /Users/chenjingyang/dev/my-job/gitee/goseaweedfs
|
||||
github.com/crawlab-team/crawlab-core => /libs/crawlab-team/crawlab-core
|
||||
github.com/crawlab-team/crawlab-vcs => /libs/crawlab-team/crawlab-vcs
|
||||
github.com/crawlab-team/crawlab-fs => /libs/crawlab-team/crawlab-fs
|
||||
github.com/crawlab-team/crawlab-db => /libs/crawlab-team/crawlab-db
|
||||
)
|
||||
|
||||
require (
|
||||
github.com/apex/log v1.9.0
|
||||
github.com/crawlab-team/crawlab-core v0.6.0-beta.20211230.1200
|
||||
github.com/crawlab-team/go-trace v0.1.1
|
||||
github.com/gin-gonic/gin v1.7.1
|
||||
github.com/spf13/cobra v1.1.3
|
||||
github.com/spf13/viper v1.7.1
|
||||
go.uber.org/dig v1.10.0
|
||||
github.com/apex/log v1.9.0
|
||||
github.com/crawlab-team/crawlab-core v0.6.0-beta.20211230.1200
|
||||
github.com/crawlab-team/go-trace v0.1.1
|
||||
github.com/gin-gonic/gin v1.7.1
|
||||
github.com/spf13/cobra v1.1.3
|
||||
github.com/spf13/viper v1.7.1
|
||||
go.uber.org/dig v1.10.0
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user