From 393b268e159a40b23bc63464f4d04d5be09e070f Mon Sep 17 00:00:00 2001 From: jacqueline Date: Sat, 21 Jan 2023 14:04:56 +1100 Subject: Vendor tinycbor, since v5 no longer includes it --- lib/cbor/tinycbor/scripts/maketag.pl | 91 ++++++++++++++++++++++++++++++++ lib/cbor/tinycbor/scripts/update-docs.sh | 52 ++++++++++++++++++ 2 files changed, 143 insertions(+) create mode 100644 lib/cbor/tinycbor/scripts/maketag.pl create mode 100755 lib/cbor/tinycbor/scripts/update-docs.sh (limited to 'lib/cbor/tinycbor/scripts') diff --git a/lib/cbor/tinycbor/scripts/maketag.pl b/lib/cbor/tinycbor/scripts/maketag.pl new file mode 100644 index 00000000..5b1a8b79 --- /dev/null +++ b/lib/cbor/tinycbor/scripts/maketag.pl @@ -0,0 +1,91 @@ +#!perl +use strict; +sub run(@) { + open PROC, "-|", @_ or die("Cannot run $_[0]: $!"); + my @out; + while () { + chomp; + push @out, $_; + } + close PROC; + return @out; +} + +my @tags = run("git", "tag"); +my @v = run("git", "show", "HEAD:VERSION"); +my $v = $v[0]; + +my $tagfile = ".git/TAG_EDITMSG"; +open TAGFILE, ">", $tagfile + or die("Cannot create file for editing tag message: $!"); +select TAGFILE; +print "TinyCBOR release $v\n"; +print "\n"; +print "# Write something nice about this release here\n"; + +# Do we have a commit template? +my @result = run("git", "config", "--get", "commit.template"); +if (scalar @result) { + open TEMPLATE, "<", $result[0]; + map { print $_; }