]> git.ipfire.org Git - thirdparty/chrony.git/commitdiff
1st attempt at a git-compatible make_release script
authorRichard P. Curnow <rc@rc0.org.uk>
Sun, 22 Jan 2006 23:54:19 +0000 (23:54 +0000)
committerRichard P. Curnow <rc@rc0.org.uk>
Sun, 22 Jan 2006 23:54:19 +0000 (23:54 +0000)
build_kit [deleted file]
make_release [new file with mode: 0755]

diff --git a/build_kit b/build_kit
deleted file mode 100755 (executable)
index 6ca2ca6..0000000
--- a/build_kit
+++ /dev/null
@@ -1,45 +0,0 @@
-#!/usr/bin/env perl
-# $Header: /cvs/src/chrony/build_kit,v 1.13 2003/01/12 23:50:54 richard Exp $
-# Perl script for building a release
-
-# Have to run it in the current directory
-if (($0 ne "build_kit") && ($0 ne "./build_kit")) {
-  die "Have to be in the checked-out directory to run build_kit";
-}
-
-$here=`pwd`;
-chomp $here;
-$version=$here;
-$version =~ s,^.*/chrony-([^/]+)$,$1, || die "Didn't recognize directory name";
-print "Building kit for version $version\n";
-
-chmod 0755, "configure";
-
-# Overwrite normal version.h file with version-specific one
-open (OUT, ">version.txt");
-print OUT $version."\n";
-close OUT;
-
-# Construct chrony.spec file
-open (IN, "<chrony.spec.sample");
-open (OUT, ">chrony.spec");
-while (<IN>) {
-  s/\@\@VERSION\@\@/$version/;
-  print OUT;
-}
-close (IN);
-close (OUT);
-
-
-# Requires the makeinfo from texinfo v4
-system("makeinfo --no-headers --number-sections -o chrony.txt chrony.texi");
-system ("rm -rf ./{arch}");
-system ("rm -rf ./.arch-ids");
-unlink "chrony.spec.sample";
-unlink("build_kit");
-
-chdir ("..");
-system ("tar cvf - chrony-$version | gzip -9 > chrony-$version.tar.gz");
-system ("gpg -b -a -o chrony-$version-tar-gz-asc.txt chrony-$version.tar.gz");
-
-
diff --git a/make_release b/make_release
new file mode 100755 (executable)
index 0000000..faa3858
--- /dev/null
@@ -0,0 +1,52 @@
+#!/usr/bin/env perl
+
+$tool = "chrony";
+
+$version = shift || die "Usage : $0 <version>\n";
+$subdir = "${tool}-${version}";
+
+unless (-d ".git") {
+  die "No .git subdirectory?"
+}
+
+unless (-d "RELEASES") {
+  mkdir "RELEASES", 0755;
+}
+
+system ("git-tag -s $version");
+die "git-tag failed" if ($? != 0);
+if (-d "RELEASES/$subdir") {
+  system ("rm -rf RELEASES/$subdir");
+}
+
+system ("git-tar-tree $version RELEASES/${subdir} | tar xf -");
+die "git-tar-tree failed" if ($? != 0);
+
+chdir "RELEASES";
+$here = qx/pwd/;
+chomp $here;
+chdir $subdir;
+
+open (OUT, ">version.txt");
+print OUT $version."\n";
+close OUT;
+
+open (IN, "<${tool}.spec.sample");
+open (OUT, ">${tool}.spec");
+while (<IN>) {
+  s/\@\@VERSION\@\@/$version/;
+  print OUT;
+}
+close (IN);
+close (OUT);
+
+system("makeinfo --no-headers --number-sections -o chrony.txt chrony.texi");
+unlink "make_release";
+unlink "${tool}.spec.sample";
+unlink ".gitignore";
+
+chdir $here;
+system ("tar cvf - $subdir | gzip -9 > ${subdir}.tar.gz");
+system ("gpg -b -a -o ${subdir}-tar-gz-asc.txt ${subdir}.tar.gz");
+
+