2021-10-18 15:41:52 +03:00
|
|
|
#!/usr/bin/awk -f
|
|
|
|
|
2023-03-02 23:42:35 +02:00
|
|
|
# Copyright 2023 Uber Technologies, Inc.
|
|
|
|
# Licensed under the Apache License, Version 2.0
|
|
|
|
|
2021-10-18 15:41:52 +03:00
|
|
|
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),"
|
2022-06-08 23:03:33 +03:00
|
|
|
print " urls = [\"https://git.sr.ht/~motiejus/bazel-zig-cc/archive/{}.tar.gz\".format(BAZEL_ZIG_CC_VERSION)],"
|
2021-10-18 15:41:52 +03:00
|
|
|
print ")"
|
|
|
|
stage=1
|
|
|
|
next
|
|
|
|
}
|
|
|
|
|
|
|
|
!/^)$/ && stage==1 {
|
|
|
|
next
|
|
|
|
};
|
|
|
|
|
|
|
|
/^)$/ && stage==1 {
|
|
|
|
stage=2
|
|
|
|
next
|
|
|
|
};
|
|
|
|
|
|
|
|
stage==2 {
|
|
|
|
print;
|
|
|
|
};
|