mirror of
https://github.com/SagerNet/sing-box.git
synced 2024-11-22 00:21:30 +00:00
Update release config
This commit is contained in:
parent
7613b8dbfe
commit
b1b1ab5350
|
@ -11,9 +11,10 @@ builds:
|
||||||
ldflags:
|
ldflags:
|
||||||
- -X github.com/sagernet/sing-box/constant.Commit={{ .ShortCommit }} -s -w -buildid=
|
- -X github.com/sagernet/sing-box/constant.Commit={{ .ShortCommit }} -s -w -buildid=
|
||||||
tags:
|
tags:
|
||||||
- with_clash_api
|
|
||||||
- with_quic
|
- with_quic
|
||||||
|
- with_wireguard
|
||||||
- with_acme
|
- with_acme
|
||||||
|
- with_clash_api
|
||||||
env:
|
env:
|
||||||
- CGO_ENABLED=0
|
- CGO_ENABLED=0
|
||||||
targets:
|
targets:
|
||||||
|
@ -40,8 +41,6 @@ archives:
|
||||||
wrap_in_directory: true
|
wrap_in_directory: true
|
||||||
files:
|
files:
|
||||||
- LICENSE
|
- LICENSE
|
||||||
- src: release/config/config.json
|
|
||||||
strip_parent: true
|
|
||||||
name_template: '{{ .ProjectName }}-{{ .Version }}-{{ .Os }}-{{ .Arch }}{{ with .Arm }}v{{ . }}{{ end }}{{ with .Mips }}_{{ . }}{{ end }}{{ if not (eq .Amd64 "v1") }}{{ .Amd64 }}{{ end }}'
|
name_template: '{{ .ProjectName }}-{{ .Version }}-{{ .Os }}-{{ .Arch }}{{ with .Arm }}v{{ . }}{{ end }}{{ with .Mips }}_{{ . }}{{ end }}{{ if not (eq .Amd64 "v1") }}{{ .Amd64 }}{{ end }}'
|
||||||
nfpms:
|
nfpms:
|
||||||
- id: package
|
- id: package
|
||||||
|
@ -67,10 +66,11 @@ nfpms:
|
||||||
- src: LICENSE
|
- src: LICENSE
|
||||||
dst: /usr/share/licenses/sing-box/LICENSE
|
dst: /usr/share/licenses/sing-box/LICENSE
|
||||||
source:
|
source:
|
||||||
enabled: true
|
enabled: false
|
||||||
name_template: '{{ .ProjectName }}-{{ .Version }}.source'
|
name_template: '{{ .ProjectName }}-{{ .Version }}.source'
|
||||||
prefix_template: '{{ .ProjectName }}-{{ .Version }}/'
|
prefix_template: '{{ .ProjectName }}-{{ .Version }}/'
|
||||||
checksum:
|
checksum:
|
||||||
|
disable: true
|
||||||
name_template: '{{ .ProjectName }}-{{ .Version }}.checksum'
|
name_template: '{{ .ProjectName }}-{{ .Version }}.checksum'
|
||||||
signs:
|
signs:
|
||||||
- artifacts: checksum
|
- artifacts: checksum
|
||||||
|
|
15
Makefile
15
Makefile
|
@ -1,6 +1,6 @@
|
||||||
NAME = sing-box
|
NAME = sing-box
|
||||||
COMMIT = $(shell git rev-parse --short HEAD)
|
COMMIT = $(shell git rev-parse --short HEAD)
|
||||||
TAGS ?= with_quic,with_clash_api
|
TAGS ?= with_quic,with_wireguard,with_clash_api
|
||||||
PARAMS = -v -trimpath -tags '$(TAGS)' -ldflags \
|
PARAMS = -v -trimpath -tags '$(TAGS)' -ldflags \
|
||||||
'-X "github.com/sagernet/sing-box/constant.Commit=$(COMMIT)" \
|
'-X "github.com/sagernet/sing-box/constant.Commit=$(COMMIT)" \
|
||||||
-w -s -buildid='
|
-w -s -buildid='
|
||||||
|
@ -31,7 +31,18 @@ lint:
|
||||||
GOOS=freebsd golangci-lint run ./...
|
GOOS=freebsd golangci-lint run ./...
|
||||||
|
|
||||||
lint_install:
|
lint_install:
|
||||||
go install github.com/golangci/golangci-lint/cmd/golangci-lint@latest
|
go install -v github.com/golangci/golangci-lint/cmd/golangci-lint@latest
|
||||||
|
|
||||||
|
snapshot:
|
||||||
|
goreleaser release --rm-dist --snapshot
|
||||||
|
mkdir dist/release
|
||||||
|
mv dist/*.tar.gz dist/*.zip dist/*.deb dist/*.rpm dist/release
|
||||||
|
ghr --delete --draft --prerelease -p 1 nightly dist/release
|
||||||
|
rm -r dist
|
||||||
|
|
||||||
|
snapshot_install:
|
||||||
|
go install -v github.com/goreleaser/goreleaser@latest
|
||||||
|
go install -v github.com/tcnksm/ghr@latest
|
||||||
|
|
||||||
test:
|
test:
|
||||||
@go test -v . && \
|
@go test -v . && \
|
||||||
|
|
19
common/debugio/print.go
Normal file
19
common/debugio/print.go
Normal file
|
@ -0,0 +1,19 @@
|
||||||
|
package debugio
|
||||||
|
|
||||||
|
import (
|
||||||
|
"fmt"
|
||||||
|
"reflect"
|
||||||
|
|
||||||
|
"github.com/sagernet/sing/common"
|
||||||
|
)
|
||||||
|
|
||||||
|
func PrintUpstream(obj any) {
|
||||||
|
for obj != nil {
|
||||||
|
fmt.Println(reflect.TypeOf(obj))
|
||||||
|
if u, ok := obj.(common.WithUpstream); !ok {
|
||||||
|
break
|
||||||
|
} else {
|
||||||
|
obj = u.Upstream()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
Loading…
Reference in a new issue