mirror of
https://github.com/Qortal/qortal.git
synced 2025-07-23 04:36:50 +00:00
Update auto-update tools to work with testnet and on non-master branch (e.g. a testnet branch)
This commit is contained in:
@@ -33,13 +33,17 @@ while (<POM>) {
|
||||
}
|
||||
close(POM);
|
||||
|
||||
# short-form commit hash on 'master' branch
|
||||
# determine git branch
|
||||
my $branch_name = ` git symbolic-ref -q HEAD `
|
||||
$branch_name =~ s|^refs/heads/||; # ${branch_name##refs/heads/}
|
||||
|
||||
# short-form commit hash on base branch (non-auto-update)
|
||||
my $commit_hash = `git show --no-patch --format=%h`;
|
||||
die("Can't find commit hash\n") if ! defined $commit_hash;
|
||||
chomp $commit_hash;
|
||||
printf "Commit hash on 'master' branch: %s\n", $commit_hash;
|
||||
printf "Commit hash on '%s' branch: %s\n", $branch_name, $commit_hash;
|
||||
|
||||
# build timestamp / commit timestamp on 'master' branch
|
||||
# build timestamp / commit timestamp on base branch
|
||||
my $timestamp = `git show --no-patch --format=%ct`;
|
||||
die("Can't determine commit timestamp\n") if ! defined $timestamp;
|
||||
$timestamp *= 1000; # Convert to milliseconds
|
||||
@@ -133,4 +137,4 @@ chomp $result;
|
||||
die("Transaction wasn't accepted:\n$result\n") unless $result eq 'true';
|
||||
|
||||
my $decoded_tx = `curl --silent -H "Content-Type: application/json" --url http://localhost:${port}/transactions/decode --data ${signed_tx}`;
|
||||
printf "\nTransaction accepted:\n$decoded_tx\n";
|
||||
printf "\nTransaction accepted:\n$decoded_tx\n";
|
||||
|
Reference in New Issue
Block a user