~motiejus/bazel-zig-cc

bazel-zig-cc/relnotes.awk -rwxr-xr-x 615 bytes
90fddbcf — Motiejus Jakštys Update release notes for v0.3.3 5 hours ago
                                                                                
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
#!/usr/bin/awk -f

BEGIN {stage=0};

!/```/ && stage==0 {
    print
}

/```/ && stage==0 {
    print "```"
    print "BAZEL_ZIG_CC_VERSION = \""tag"\""
    print ""
    print "http_archive("
    print "    name = \"bazel-zig-cc\","
    print "    sha256 = \""sha256sum"\","
    print "    strip_prefix = \"bazel-zig-cc-{}\".format(BAZEL_ZIG_CC_VERSION),"
    print "    urls = [\"https://git.sr.ht/~motiejus/bazel-zig-cc/archive/{}.tar.gz\".format(BAZEL_ZIG_CC_VERSION)],"
    print ")"
    stage=1
    next
}

!/^)$/ && stage==1 {
    next
};

/^)$/ && stage==1 {
    stage=2
    next
};

stage==2 {
    print;
};