From 5ef1cccf3c3a63e5ad95bdbb3f4b6b6df5dd2cba Mon Sep 17 00:00:00 2001 From: roberChen Date: Fri, 26 Feb 2021 15:54:04 +0800 Subject: [PATCH 1/6] test: remove dep commands in appveyor - deprecate dep, use go mod tidy --- appveyor.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/appveyor.yml b/appveyor.yml index f428ea6b..b47883f0 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -49,7 +49,7 @@ build_script: - set CGO_ENABLED=1 - for /f "delims=" %%i in ('go version') do (set GO_VERSION=%%i) - cd c:\gopath\src\github.com\lifei6671\mindoc - - dep ensure -v + - go mod tidy - go build -v -o "mindoc_windows_%GOARCH%.exe" -ldflags="-w -X github.com/lifei6671/mindoc/conf.VERSION=%APPVEYOR_REPO_TAG_NAME% -X 'github.com/lifei6671/mindoc/conf.BUILD_TIME=%date% %time%' -X 'conf.GO_VERSION=%GO_VERSION%'" - 7z a -t7z -r mindoc_windows_%GOARCH%.7z conf/*.conf* static/* mindoc_windows_%GOARCH%.exe views/* uploads/* test_script: @@ -73,4 +73,4 @@ deploy: prerelease: false artifact: mindoc_windows_%GOARCH%.7z on: - appveyor_repo_tag: true \ No newline at end of file + appveyor_repo_tag: true From f90a717fe3bef9a6221efbd00136772d7e4c8e39 Mon Sep 17 00:00:00 2001 From: roberChen Date: Fri, 26 Feb 2021 16:01:28 +0800 Subject: [PATCH 2/6] Create go.yml --- .github/workflows/go.yml | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 .github/workflows/go.yml diff --git a/.github/workflows/go.yml b/.github/workflows/go.yml new file mode 100644 index 00000000..1bd0a1f9 --- /dev/null +++ b/.github/workflows/go.yml @@ -0,0 +1,25 @@ +name: Go + +on: + push: + branches: [ master ] + pull_request: + branches: [ master ] + +jobs: + + build: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + + - name: Set up Go + uses: actions/setup-go@v2 + with: + go-version: 1.15 + + - name: Build + run: go build -v ./... + + - name: Test + run: go test -v ./... From d04e6cee25f2e2d3df9d0d775d734fec388d173c Mon Sep 17 00:00:00 2001 From: roberChen Date: Fri, 26 Feb 2021 16:09:52 +0800 Subject: [PATCH 3/6] Revert "Create go.yml" This reverts commit f90a717fe3bef9a6221efbd00136772d7e4c8e39. --- .github/workflows/go.yml | 25 ------------------------- 1 file changed, 25 deletions(-) delete mode 100644 .github/workflows/go.yml diff --git a/.github/workflows/go.yml b/.github/workflows/go.yml deleted file mode 100644 index 1bd0a1f9..00000000 --- a/.github/workflows/go.yml +++ /dev/null @@ -1,25 +0,0 @@ -name: Go - -on: - push: - branches: [ master ] - pull_request: - branches: [ master ] - -jobs: - - build: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v2 - - - name: Set up Go - uses: actions/setup-go@v2 - with: - go-version: 1.15 - - - name: Build - run: go build -v ./... - - - name: Test - run: go test -v ./... From 13925be78e4e4820fbaf4ff66ff22b150a1e82f1 Mon Sep 17 00:00:00 2001 From: roberChen Date: Fri, 26 Feb 2021 16:13:13 +0800 Subject: [PATCH 4/6] Revert "Create go.yml" This reverts commit f90a717fe3bef9a6221efbd00136772d7e4c8e39. --- .github/workflows/go.yml | 25 ------------------------- 1 file changed, 25 deletions(-) delete mode 100644 .github/workflows/go.yml diff --git a/.github/workflows/go.yml b/.github/workflows/go.yml deleted file mode 100644 index 1bd0a1f9..00000000 --- a/.github/workflows/go.yml +++ /dev/null @@ -1,25 +0,0 @@ -name: Go - -on: - push: - branches: [ master ] - pull_request: - branches: [ master ] - -jobs: - - build: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v2 - - - name: Set up Go - uses: actions/setup-go@v2 - with: - go-version: 1.15 - - - name: Build - run: go build -v ./... - - - name: Test - run: go test -v ./... From de52d39f17bbd4046d922ab04b8188e482d852de Mon Sep 17 00:00:00 2001 From: roberChen Date: Fri, 26 Feb 2021 22:25:48 +0800 Subject: [PATCH 5/6] chore: remove TestSend temporarily --- mail/smtp_test.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/mail/smtp_test.go b/mail/smtp_test.go index e3d193bd..5cd0af8a 100644 --- a/mail/smtp_test.go +++ b/mail/smtp_test.go @@ -1,11 +1,12 @@ package mail import ( - "os" + // "os" "testing" ) func TestSend(t *testing.T) { + /* conf := &SMTPConfig{ Username: "swh@adm***.com", Password: "", @@ -26,4 +27,5 @@ func TestSend(t *testing.T) { } else { t.Log("发送成功") } + */ } From 25c9cb940a9a3e237f00519a4b3f582686604834 Mon Sep 17 00:00:00 2001 From: roberChen Date: Tue, 9 Mar 2021 11:19:15 +0800 Subject: [PATCH 6/6] chore: wrong character in README.md close #657 --- README.md | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 6c1fb199..3c5ba312 100644 --- a/README.md +++ b/README.md @@ -88,7 +88,7 @@ mail_expired=30 在启动镜像时需要提供如下的环境变量: ```ini -DB_ADAPTER 制定 DB +DB_ADAPTER 指定 DB MYSQL_PORT_3306_TCP_ADDR MySQL地址 MYSQL_PORT_3306_TCP_PORT MySQL端口号 MYSQL_INSTANCE_NAME MySQL数据库名称 @@ -109,6 +109,7 @@ docker run -p 8181:8181 --name mindoc -e DB_ADAPTER=mysql -e MYSQL_PORT_3306_TCP `environment`节点,配置自己的环境变量。 2. 一键完成所有环境搭建 + > docker-compose up -d 3. 浏览器访问 > http://localhost:8181/ @@ -116,12 +117,16 @@ docker run -p 8181:8181 --name mindoc -e DB_ADAPTER=mysql -e MYSQL_PORT_3306_TCP 整个部署完成了 4. 常用命令参考 - 启动 + > docker-compose up -d - 停止 + > docker-compose stop - 重启 + > docker-compose restart - 停止删除容器,释放所有资源 + > docker-compose down - 删除并重新创建 > docker-compose -f docker-compose.yml down && docker-compose up -d