File tree Expand file tree Collapse file tree 5 files changed +42
-11
lines changed
Expand file tree Collapse file tree 5 files changed +42
-11
lines changed Original file line number Diff line number Diff line change 1+ name : release
2+
3+ on :
4+ push :
5+ tags :
6+ - ' v*'
7+ jobs :
8+ build :
9+ runs-on : ubuntu-latest
10+ steps :
11+ - uses : actions/checkout@v2
12+ - name : set up go
13+ uses : actions/setup-go@v2
14+ with :
15+ go-version : 1.17
16+ - name : reviewdog
17+ uses : reviewdog/action-setup@v1
18+ run : reviewdog -conf=.reviewdog.yml -reporter=github-pr-check
19+ - name : build
20+ env :
21+ TRAVIS_TAG : ${github.ref_name}
22+ run : ./scripts/binary.sh darwin && ./scripts/binary.sh windows && ./scripts/binary.sh linux
23+ - name : update
24+ uses : softprops/action-gh-release@v1
25+ if : startsWith(github.ref, 'refs/tags/')
26+ with :
27+ files : |
28+ dist/docker-debug-darwin-amd64
29+ dist/docker-debug-linux-amd64
30+ dist/docker-debug-windows-amd64.exe
Original file line number Diff line number Diff line change @@ -26,16 +26,16 @@ brew install docker-debug
2626** 下载二进制文件**
2727``` shell
2828# MacOS
29- curl -Lo docker-debug https://github.com/zeromake/docker-debug/releases/download/0 .7.3 /docker-debug-darwin-amd64
29+ curl -Lo docker-debug https://github.com/zeromake/docker-debug/releases/download/v0 .7.4 /docker-debug-darwin-amd64
3030
3131# Linux
32- curl -Lo docker-debug https://github.com/zeromake/docker-debug/releases/download/0 .7.3 /docker-debug-linux-amd64
32+ curl -Lo docker-debug https://github.com/zeromake/docker-debug/releases/download/v0 .7.4 /docker-debug-linux-amd64
3333
3434chmod +x ./docker-debug
3535sudo mv docker-debug /usr/local/bin/
3636
3737# Windows
38- curl -Lo docker-debug.exe https://github.com/zeromake/docker-debug/releases/download/0 .7.3 /docker-debug-windows-amd64.exe
38+ curl -Lo docker-debug.exe https://github.com/zeromake/docker-debug/releases/download/v0 .7.4 /docker-debug-windows-amd64.exe
3939```
4040
4141或者到 [ release page] ( https://github.com/zeromake/docker-debug/releases/lastest ) 下载最新可执行文件并添加到 PATH。
@@ -64,7 +64,7 @@ docker-debug 使用 `nicolaka/netshoot` 作为默认镜像来运行额外容器
6464你可以通过命令行 ` flag(--image) ` 覆盖默认镜像,或者直接修改配置文件 ` ~/.docker-debug/config.toml ` 中的 ` image ` 。
6565``` toml
6666# 配置文件版本号
67- version = " 0.7.3 "
67+ version = " 0.7.4 "
6868# 目标容器文件系统挂载点
6969mount_dir = " /mnt/container"
7070# 默认镜像
Original file line number Diff line number Diff line change @@ -27,16 +27,16 @@ brew install docker-debug
2727** download binary file**
2828``` shell
2929# MacOS
30- curl -Lo docker-debug https://github.com/zeromake/docker-debug/releases/download/0 .7.3 /docker-debug-darwin-amd64
30+ curl -Lo docker-debug https://github.com/zeromake/docker-debug/releases/download/v0 .7.4 /docker-debug-darwin-amd64
3131
3232# Linux
33- curl -Lo docker-debug https://github.com/zeromake/docker-debug/releases/download/0 .7.3 /docker-debug-linux-amd64
33+ curl -Lo docker-debug https://github.com/zeromake/docker-debug/releases/download/v0 .7.4 /docker-debug-linux-amd64
3434
3535chmod +x ./docker-debug
3636sudo mv docker-debug /usr/local/bin/
3737
3838# Windows
39- curl -Lo docker-debug.exe https://github.com/zeromake/docker-debug/releases/download/0 .7.3 /docker-debug-windows-amd64.exe
39+ curl -Lo docker-debug.exe https://github.com/zeromake/docker-debug/releases/download/v0 .7.4 /docker-debug-windows-amd64.exe
4040```
4141
4242download the latest binary from the [ release page] ( https://github.com/zeromake/docker-debug/releases/lastest ) and add it to your PATH.
@@ -64,7 +64,7 @@ mv docker-debug /usr/local/bin
6464docker-debug uses nicolaka/netshoot as the default image to run debug container.
6565You can override the default image with cli flag, or even better, with config file ~ /.docker-debug/config.toml
6666``` toml
67- version = " 0.7.3 "
67+ version = " 0.7.4 "
6868image = " nicolaka/netshoot:latest"
6969mount_dir = " /mnt/container"
7070timeout = 10000000000
Original file line number Diff line number Diff line change @@ -8,7 +8,7 @@ source ./scripts/variables.env
88if [[ -n $OS ]]; then
99 source ./scripts/variables.${OS} .env
1010fi
11- echo " Building statically linked $TARGET "
11+ echo " Building statically linked $VERSION $ TARGET"
1212export CGO_ENABLED=0
1313go build -o " ${TARGET} " --ldflags " ${LDFLAGS} " " ${SOURCE} "
1414
Original file line number Diff line number Diff line change 11PLATFORM = ${ PLATFORM:-"TravisLinux" }
2- VERSION = ${ VERSION:-$TRAVIS_TAG }
3- VERSION = ${ VERSION:-"unknown-version" }
2+ V = ${ VERSION:-$TRAVIS_TAG }
3+ V = ${ VERSION:-"unknown-version" }
44GITCOMMIT = ${ GITCOMMIT:-$(git rev-parse --short HEAD 2> /dev/null || true) }
55BUILDTIME = ${ BUILDTIME:-$(date +'%Y-%m-%d %H:%M:%S %z') }
6+ VERSION = ` echo $V | sed 's/^v//g'`
67
78PLATFORM_LDFLAGS =
89if test -n "${PLATFORM}"; then
You can’t perform that action at this time.
0 commit comments