-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #39 from nicelizhi/dev-1.2.0
Dev 1.2.0
- Loading branch information
Showing
31 changed files
with
977 additions
and
107 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
name: 'GitHub Actions Mirror' | ||
|
||
on: [push, delete] | ||
|
||
jobs: | ||
mirror_to_gitee: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: 'Checkout' | ||
uses: actions/checkout@v1 | ||
- name: 'Mirror to gitee' | ||
uses: pixta-dev/repository-mirroring-action@v1 | ||
with: | ||
target_repo_url: | ||
[email protected]:nicelizhi/easy-admin.git | ||
ssh_private_key: | ||
${{ secrets.GITEE_KEY }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,26 +1,63 @@ | ||
export PATH := $(GOPATH)/bin:$(PATH) | ||
export GO111MODULE=on | ||
GOCMD=go | ||
GOBUILD=$(GOCMD) build | ||
GOTEST=$(GOCMD) test | ||
GOCLEAN=$(GOCMD) clean | ||
GOGET=$(GOCMD) get | ||
LDFLAGS := -s -w | ||
# application name | ||
PROJECT:=easy-admin | ||
|
||
# application version | ||
VERSION := 1.2.0 | ||
# application url | ||
URL := https://github.com/nicelizhi/easy-admin | ||
|
||
.PHONY: build | ||
|
||
all: | ||
make build-ui | ||
make build | ||
|
||
# build vue ui | ||
build-ui: | ||
@echo "build node start" | ||
cd ./ui/ && npm run build:prod | ||
|
||
# build go application | ||
build: | ||
CGO_ENABLED=0 go build -ldflags="$(LDFLAGS)" -a -installsuffix "" -o easy-admin . | ||
CGO_ENABLED=0 go build -ldflags="$(LDFLAGS)" -a -installsuffix "" -o $(PROJECT) . | ||
|
||
# make build-linux | ||
build-linux: | ||
@docker build -t easy-admin:latest . | ||
make build-ui | ||
make build | ||
@docker build -t $(PROJECT):$(VERSION) . | ||
@echo "build successful" | ||
|
||
# build sql go application version | ||
build-sqlite: | ||
go build -tags sqlite3 -ldflags="$(LDFLAGS)" -a -installsuffix -o easy-admin . | ||
go build -tags sqlite3 -ldflags="$(LDFLAGS)" -a -installsuffix -o $(PROJECT) . | ||
|
||
clean: | ||
$(GOCLEAN) | ||
rm ./$(PROJECT) | ||
|
||
test: | ||
$(GOTEST) | ||
|
||
restart: | ||
make stop | ||
make start | ||
|
||
.PHONY: start | ||
start: | ||
nohup ./$(PROJECT) server -c=config/settings.dev_steve.yml >> acc.txt & | ||
ps aux | grep "$(PROJECT)" | ||
|
||
stop: | ||
pkill $(PROJECT) | ||
|
||
# debug file | ||
debug: | ||
dlv debug $(file) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.