mirror of
https://git.openafs.org/openafs.git
synced 2025-01-18 15:00:12 +00:00
make-release: Run git describe once
Run git describe once at the beginning of make-release to find the version information used to derive the tarball file names and saved in the .version file. This is a cleanup and refactoring change to prepare for a future commit. Change-Id: I0debeeffa5d2c63ab1498588766cb36424d15cd5 Reviewed-on: https://gerrit.openafs.org/14150 Reviewed-by: Cheyenne Wills <cwills@sinenomine.net> Tested-by: BuildBot <buildbot@rampaginggeek.com> Reviewed-by: Andrew Deason <adeason@sinenomine.net> Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
This commit is contained in:
parent
d0753c0ace
commit
188ca8bf52
@ -45,13 +45,16 @@ if ($tagPoint) {
|
||||
|
||||
my $version = `git describe --abbrev=4 $tagName`;
|
||||
chomp $version;
|
||||
$version=~s/openafs-[^-]*-//;
|
||||
$version=~s/_/./g;
|
||||
if (!$version) {
|
||||
die "Failed to describe $tagName.\n";
|
||||
}
|
||||
my $suffix = $version;
|
||||
$suffix =~ s/openafs-[^-]*-//;
|
||||
$suffix =~ s/_/./g;
|
||||
my $name = "openafs-$suffix";
|
||||
|
||||
# Grab the tagged code into a temporary directory
|
||||
|
||||
my $name = "openafs-".$version;
|
||||
|
||||
my $tempDir = File::Temp::tempdir();
|
||||
system ("git archive --format=tar --prefix=$name/ $tagName ".
|
||||
" | tar -C $tempDir -x") == 0
|
||||
@ -68,7 +71,10 @@ if ($last) {
|
||||
}
|
||||
|
||||
# Describe the tree
|
||||
system("git describe --abbrev=4 $tagName > $tempDir/$name/.version");
|
||||
open(my $fh, ">", "$tempDir/$name/.version") or
|
||||
die "Failed to open $tempDir/$name/.version: $!\n";
|
||||
print $fh "$version\n";
|
||||
close($fh);
|
||||
|
||||
# Run regen.sh to create the rest of the tree
|
||||
system ("cd $tempDir/$name && ./regen.sh") == 0
|
||||
|
Loading…
Reference in New Issue
Block a user