mirror of
https://github.com/ayflying/p2p.git
synced 2026-03-05 01:39:23 +00:00
Compare commits
2 Commits
v0.0.12
...
4bed53dc16
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
4bed53dc16 | ||
| 14f98a6009 |
6
.github/workflows/release.yml
vendored
6
.github/workflows/release.yml
vendored
@@ -39,7 +39,7 @@ jobs:
|
|||||||
run: gf build -ew -v "${{ github.ref_name }}"
|
run: gf build -ew -v "${{ github.ref_name }}"
|
||||||
|
|
||||||
- name: Upload build artifacts
|
- name: Upload build artifacts
|
||||||
uses: actions/upload-artifact@v4
|
uses: actions/upload-artifact@v3
|
||||||
with:
|
with:
|
||||||
name: p2p-${{ github.ref_name }}
|
name: p2p-${{ github.ref_name }}
|
||||||
path: |
|
path: |
|
||||||
@@ -50,10 +50,10 @@ jobs:
|
|||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@
|
||||||
|
|
||||||
- name: Download artifacts
|
- name: Download artifacts
|
||||||
uses: actions/download-artifact@v4
|
uses: actions/download-artifact@v3
|
||||||
with:
|
with:
|
||||||
name: p2p-${{ github.ref_name }}
|
name: p2p-${{ github.ref_name }}
|
||||||
path: bin
|
path: bin
|
||||||
|
|||||||
@@ -7,7 +7,6 @@ import (
|
|||||||
"github.com/gogf/gf/v2/frame/g"
|
"github.com/gogf/gf/v2/frame/g"
|
||||||
"github.com/gogf/gf/v2/os/gcron"
|
"github.com/gogf/gf/v2/os/gcron"
|
||||||
"github.com/gogf/gf/v2/os/gctx"
|
"github.com/gogf/gf/v2/os/gctx"
|
||||||
"github.com/gogf/gf/v2/os/gfile"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
func Boot() {
|
func Boot() {
|
||||||
@@ -15,8 +14,6 @@ func Boot() {
|
|||||||
getDev, _ := g.Cfg().GetWithEnv(gctx.New(), "dev")
|
getDev, _ := g.Cfg().GetWithEnv(gctx.New(), "dev")
|
||||||
if !getDev.Bool() {
|
if !getDev.Bool() {
|
||||||
var update = updateGithub.New("https://api.github.com/repos/ayflying/p2p/releases/latest")
|
var update = updateGithub.New("https://api.github.com/repos/ayflying/p2p/releases/latest")
|
||||||
gfile.PutContents("version.txt", "v0.0.9")
|
|
||||||
|
|
||||||
// 每天0点检查更新
|
// 每天0点检查更新
|
||||||
gcron.Add(gctx.New(), "0 0 0 * * *", func(ctx context.Context) {
|
gcron.Add(gctx.New(), "0 0 0 * * *", func(ctx context.Context) {
|
||||||
err := update.CheckUpdate(true)
|
err := update.CheckUpdate(true)
|
||||||
|
|||||||
Reference in New Issue
Block a user