forked from lix-project/hydra
GithubPulls: Add 'revision' to the input
This commit is contained in:
parent
c6f0753435
commit
08708e899a
|
@ -7,6 +7,7 @@ use LWP::UserAgent;
|
||||||
use JSON;
|
use JSON;
|
||||||
use Hydra::Helper::CatalystUtils;
|
use Hydra::Helper::CatalystUtils;
|
||||||
use File::Temp;
|
use File::Temp;
|
||||||
|
use POSIX qw(strftime);
|
||||||
|
|
||||||
sub supportedInputTypes {
|
sub supportedInputTypes {
|
||||||
my ($self, $inputTypes) = @_;
|
my ($self, $inputTypes) = @_;
|
||||||
|
@ -56,7 +57,8 @@ sub fetchInput {
|
||||||
close $fh;
|
close $fh;
|
||||||
my $storePath = `nix-store --add "$filename"`
|
my $storePath = `nix-store --add "$filename"`
|
||||||
or die "cannot copy path $filename to the Nix store.\n";
|
or die "cannot copy path $filename to the Nix store.\n";
|
||||||
return { storePath => $storePath };
|
my $timestamp = time;
|
||||||
|
return { storePath => $storePath, revision => strftime "%Y%m%d%H%M%S", gmtime($timestamp) };
|
||||||
}
|
}
|
||||||
|
|
||||||
1;
|
1;
|
||||||
|
|
Loading…
Reference in a new issue