代码拉取完成,页面将自动刷新
同步操作将从 samwaf/SamWaf 强制同步,此操作会覆盖自 Fork 仓库以来所做的任何修改,且无法恢复!!!
确定后同步将在后台操作,完成时将刷新页面,请耐心等待。
# This is an example .goreleaser.yml file with some sensible defaults.
# Make sure to check the documentation at https://goreleaser.com
# The lines below are called `modelines`. See `:help modeline`
# Feel free to remove those if you don't want/need to use them.
# yaml-language-server: $schema=https://goreleaser.com/static/schema.json
# vim: set ts=2 sw=2 tw=0 fo=cnqoj
version: 2
before:
hooks:
# You may remove this if you don't use go modules.
- go mod tidy
# you may remove this if you don't need go generate
- go generate ./...
# pull samwaf web
- curl -L https://github.com/samwafgo/SamWafWeb/releases/latest/download/dist.tar.gz -o dist.tar.gz
- tar -zxvf dist.tar.gz
- rm -rf public/dist
- mv -f dist public
- rm -rf dist.tar.gz
builds:
- id: "samwaf_linux"
binary: "SamWafLinux64"
env:
- CGO_ENABLED=1
- CC=x86_64-linux-gnu-gcc
- CXX=x86_64-linux-gnu-g++
- CGO_CFLAGS=-Wno-unused-variable
goos:
- linux
goarch:
- amd64
ldflags:
- -X SamWaf/global.GWAF_RELEASE=true
- -X SamWaf/global.GWAF_RELEASE_VERSION_NAME={{ time "20060102" }}
- -X SamWaf/global.GWAF_RELEASE_VERSION={{.Tag}}
- -s -w
- -extldflags "-static"
- id: "samwaf_win"
binary: "SamWaf64"
env:
- CGO_ENABLED=1
- CC=x86_64-w64-mingw32-gcc
- CXX=x86_64-w64-mingw32-g++
- CGO_CFLAGS=-Wno-unused-variable
goos:
- windows
goarch:
- amd64
ldflags:
- -X SamWaf/global.GWAF_RELEASE=true
- -X SamWaf/global.GWAF_RELEASE_VERSION_NAME={{ time "20060102" }}
- -X SamWaf/global.GWAF_RELEASE_VERSION={{.Tag}}
- -s -w
- -extldflags "-static"
upx:
- # Whether to enable it or not.
#
# Templates: allowed.
enabled: true
# Filter by build ID.
ids: [samwaf_linux,samwaf_win]
# Compress argument.
# Valid options are from '1' (faster) to '9' (better), and 'best'.
compress: best
archives:
- format: tar.gz
# this name template makes the OS and Arch compatible with the results of `uname`.
name_template: >-
{{ .ProjectName }}_
{{- title .Os }}_
{{- if eq .Arch "amd64" }}x86_64
{{- else if eq .Arch "386" }}i386
{{- else }}{{ .Arch }}{{ end }}
{{- if .Arm }}v{{ .Arm }}{{ end }}
{{.Tag}}
# use zip for windows archives
format_overrides:
- goos: windows
format: zip
changelog:
sort: asc
groups:
- title: Features
regexp: '^.*?feat(\([[:word:]]+\))??!?:.+$'
order: 0
- title: "Bug fixes"
regexp: '^.*?fix(\([[:word:]]+\))??!?:.+$'
order: 1
- title: Others
order: 999
filters:
exclude:
- "^docs:"
- "^test:"
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。