mirror of
https://github.com/oneclickvirt/ecs.git
synced 2025-12-18 23:38:13 +08:00
update
This commit is contained in:
1
.github/workflows/main.yaml
vendored
1
.github/workflows/main.yaml
vendored
@@ -35,4 +35,3 @@ jobs:
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GHT }}
|
||||
GOPRIVATE: github.com/oneclickvirt/security
|
||||
CGO_ENABLED: 0 # 禁用 CGO,强制静态链接
|
||||
|
||||
50
.goreleaser.yaml
Normal file
50
.goreleaser.yaml
Normal file
@@ -0,0 +1,50 @@
|
||||
before:
|
||||
hooks:
|
||||
- go mod download
|
||||
- go generate ./...
|
||||
builds:
|
||||
- env:
|
||||
- CGO_ENABLED=0 # 禁用 CGO,强制静态链接
|
||||
goos:
|
||||
- linux
|
||||
- windows
|
||||
- darwin
|
||||
- openbsd
|
||||
- freebsd
|
||||
goarch:
|
||||
- amd64
|
||||
- arm
|
||||
- arm64
|
||||
- 386
|
||||
- s390x
|
||||
- ppc64
|
||||
- ppc64le
|
||||
- riscv64
|
||||
- mips
|
||||
- mips64
|
||||
- mipsle
|
||||
- mips64le
|
||||
- loong64
|
||||
goarm:
|
||||
- 5
|
||||
- 6
|
||||
- 7
|
||||
gomips:
|
||||
- hardfloat
|
||||
- softfloat
|
||||
ldflags:
|
||||
- -s -w -X main.version={{.Version}} -X main.commit={{.ShortCommit}} -X main.date={{ .CommitDate }}
|
||||
archives:
|
||||
- name_template: >-
|
||||
{{ .ProjectName }}_{{ .Version }}_{{ if eq .Os "openbsd" }}OpenBSD{{ else }}{{ title .Os }}{{ end }}_{{ if eq .Arch "386" }}i386{{ else if eq .Arch "amd64" }}x86_64{{ else }}{{ .Arch }}{{ end }}{{ with .Arm }}v{{ . }}{{ end }}{{ with .Mips }}_{{ . }}{{ end }}{{ if not (eq .Amd64 "v1") }}{{ .Amd64 }}{{ end }}
|
||||
|
||||
checksum:
|
||||
name_template: 'checksums.txt'
|
||||
snapshot:
|
||||
name_template: "{{ .Tag }}-next"
|
||||
changelog:
|
||||
sort: asc
|
||||
filters:
|
||||
exclude:
|
||||
- '^docs:'
|
||||
- '^test:'
|
||||
2
goecs.sh
2
goecs.sh
@@ -80,7 +80,7 @@ goecs_check() {
|
||||
cdn_urls=("https://cdn0.spiritlhl.top/" "http://cdn3.spiritlhl.net/" "http://cdn1.spiritlhl.net/" "http://cdn2.spiritlhl.net/")
|
||||
check_cdn_file
|
||||
case $os in
|
||||
Linux)
|
||||
Linux|FreeBSD)
|
||||
case $arch in
|
||||
"x86_64" | "x86" | "amd64" | "x64")
|
||||
wget -O goecs.tar.gz "${cdn_success_url}https://github.com/oneclickvirt/ecs/releases/download/v${ECS_VERSION}/ecs_${ECS_VERSION}_linux_amd64.tar.gz"
|
||||
|
||||
Reference in New Issue
Block a user