-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: add chattts download & del unnecessaries
- Loading branch information
Showing
34 changed files
with
184 additions
and
343 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 |
---|---|---|
|
@@ -25,3 +25,6 @@ go.work | |
|
||
# MacOS system file | ||
.DS_Store | ||
|
||
# build result | ||
/build |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
PROJECT_NAME := rvcmd | ||
BUILD_PATH := build | ||
RUN_CMD := -h | ||
|
||
GOOS := $(go env GOOS) | ||
GOARCH := $(go env GOARCH) | ||
GO_SRC_WIN := $(shell find . -maxdepth 1 -name '*.go' | grep -v '_test.go$$' | grep -v '_windows.go$$') | ||
GO_SRC_NO_WIN := $(shell echo $(GO_SRC_WIN) | grep -v '_windows.go$$') | ||
|
||
all: | ||
@$(MAKE) -e bin | ||
bin: gen dir tidy | ||
@if [[ "$(GOARCH)" == "windows" ]]; then \ | ||
GOOS=$(GOOS) GOARCH=$(GOARCH) go build -ldflags "-s -w" -trimpath -o $(BUILD_PATH)/$(PROJECT_NAME).exe; \ | ||
else \ | ||
GOOS=$(GOOS) GOARCH=$(GOARCH) go build -ldflags "-s -w" -trimpath -o $(BUILD_PATH)/$(PROJECT_NAME); \ | ||
fi | ||
run: bin | ||
@if [[ "$(GOARCH)" == "windows" ]]; then \ | ||
$(BUILD_PATH)/$(PROJECT_NAME).exe $(RUN_CMD); \ | ||
else \ | ||
$(BUILD_PATH)/$(PROJECT_NAME) $(RUN_CMD); \ | ||
fi | ||
gen: | ||
@go generate | ||
tidy: | ||
@go mod tidy | ||
dir: | ||
@if [ ! -d "$(BUILD_PATH)" ]; then mkdir $(BUILD_PATH); fi | ||
clean: | ||
@if [ -d "$(BUILD_PATH)" ]; then \ | ||
rm -rf $(BUILD_PATH)/$(PROJECT_NAME)*; \ | ||
fi |
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.