mirror of
https://github.com/alliedmodders/metamod-source.git
synced 2024-11-29 11:24:19 +01:00
Port package scripts to Git.
This commit is contained in:
parent
b2d2480893
commit
e016f1f4c2
@ -9,6 +9,24 @@ our $SVN = "/usr/bin/svn";
|
|||||||
our $SVN_USER = 'dvander';
|
our $SVN_USER = 'dvander';
|
||||||
our $SVN_ARGS = '';
|
our $SVN_ARGS = '';
|
||||||
|
|
||||||
|
sub GitRevNum
|
||||||
|
{
|
||||||
|
my ($path) = (@_);
|
||||||
|
my ($cd, $text, $rev);
|
||||||
|
|
||||||
|
$cd = Cwd::cwd();
|
||||||
|
chdir($path);
|
||||||
|
$text = `git rev-list --count HEAD`;
|
||||||
|
chdir($cd);
|
||||||
|
|
||||||
|
chomp $text;
|
||||||
|
if ($text =~ /^(\d+)/) {
|
||||||
|
return $1;
|
||||||
|
}
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
sub HgRevNum
|
sub HgRevNum
|
||||||
{
|
{
|
||||||
my ($path) = (@_);
|
my ($path) = (@_);
|
||||||
|
@ -34,7 +34,7 @@ my ($version);
|
|||||||
|
|
||||||
$version = Build::ProductVersion(Build::PathFormat('../../build/product.version'));
|
$version = Build::ProductVersion(Build::PathFormat('../../build/product.version'));
|
||||||
$version =~ s/-dev//g;
|
$version =~ s/-dev//g;
|
||||||
$version .= '-hg' . Build::HgRevNum('../../build');
|
$version .= '-git' . Build::GitRevNum('../../build');
|
||||||
|
|
||||||
# Append OS to package version
|
# Append OS to package version
|
||||||
if ($^O eq "darwin")
|
if ($^O eq "darwin")
|
||||||
|
@ -16,7 +16,7 @@ open(PDBLOG, '../OUTPUT/pdblog.txt') or die "Could not open pdblog.txt: $!\n";
|
|||||||
my ($version);
|
my ($version);
|
||||||
$version = Build::ProductVersion(Build::PathFormat('product.version'));
|
$version = Build::ProductVersion(Build::PathFormat('product.version'));
|
||||||
$version =~ s/-dev//g;
|
$version =~ s/-dev//g;
|
||||||
$version .= '-hg' . Build::HgRevNum('.');
|
$version .= '-git' . Build::GitRevNum('.');
|
||||||
|
|
||||||
my ($build_type);
|
my ($build_type);
|
||||||
$build_type = Build::GetBuildType(Build::PathFormat('support/buildbot/build_type'));
|
$build_type = Build::GetBuildType(Build::PathFormat('support/buildbot/build_type'));
|
||||||
|
Loading…
Reference in New Issue
Block a user