Skip to content

Commit 00ab5c9

Browse files
authored
post(how-to-release-your-zig-applications): update example code to 0.12.0 (#31)
Signed-off-by: Rui Chen <rui@chenrui.dev>
1 parent 9c0dd8f commit 00ab5c9

File tree

5 files changed

+14
-4
lines changed

5 files changed

+14
-4
lines changed

.github/workflows/examples.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ jobs:
2626
fail-fast: false
2727
matrix:
2828
os: [ubuntu-latest, macos-latest]
29-
zig: [0.11.0]
29+
zig: [0.12.0]
3030
steps:
3131
- uses: actions/checkout@v4
3232

content/post/2024-01-12-how-to-release-your-zig-applications.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ date: "2024-01-12T12:04:50-0500"
55
---
66

77
> - 原文链接: https://zig.news/kristoff/how-to-release-your-zig-applications-2h90
8-
> - API 适配到 Zig 0.11.0 版本
8+
> - API 适配到 Zig 0.12.0 版本
99
> - 本文配套代码在[这里](https://github.com/zigcc/zigcc.github.io/tree/main/examples/20240112)找到
1010
1111
你刚用 Zig 写了一个应用程序,并希望其他人使用它。
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
zig 0.11.0
1+
zig 0.12.0

examples/2024-01-12-how-to-release-your-zig-applications/build.zig

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,15 @@ pub fn build(b: *std.Build) void {
44
const target = b.standardTargetOptions(.{});
55
const optimize = b.standardOptimizeOption(.{});
66
const strip = b.option(bool, "strip", "Set to true to strip binary") orelse false;
7+
78
const exe = b.addExecutable(.{
89
.name = "example",
910
.root_source_file = .{ .path = "src/main.zig" },
1011
.target = target,
1112
.optimize = optimize,
13+
.strip = strip,
1214
});
13-
exe.strip = strip;
15+
1416
b.installArtifact(exe);
1517

1618
const run_cmd = b.addRunArtifact(exe);
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
.{
2+
.name = "2024-01-12-how-to-release-your-zig-applications",
3+
.version = "0.0.0",
4+
.dependencies = .{},
5+
.paths = .{
6+
"",
7+
},
8+
}

0 commit comments

Comments
 (0)