Merge remote-tracking branch 'origin/master'

This commit is contained in:
kennycud 2025-02-01 18:44:17 -08:00
commit 9017db725e
3 changed files with 56 additions and 9 deletions

View File

@ -3,7 +3,7 @@
<modelVersion>4.0.0</modelVersion>
<groupId>org.qortal</groupId>
<artifactId>qortal</artifactId>
<version>4.6.6</version>
<version>4.7.0</version>
<packaging>jar</packaging>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>

View File

@ -114,10 +114,10 @@
"removeOnlyMintWithNameHeight": 1935500,
"groupMemberCheckHeight": 1902700,
"fixBatchRewardHeight": 1945900,
"adminsReplaceFoundersHeight": 9999999,
"nullGroupMembershipHeight": 9999999,
"ignoreLevelForRewardShareHeight": 9999999,
"adminQueryFixHeight": 9999999
"adminsReplaceFoundersHeight": 2012800,
"nullGroupMembershipHeight": 2012800,
"ignoreLevelForRewardShareHeight": 2012800,
"adminQueryFixHeight": 2012800
},
"checkpoints": [
{ "height": 1136300, "signature": "3BbwawEF2uN8Ni5ofpJXkukoU8ctAPxYoFB7whq9pKfBnjfZcpfEJT4R95NvBDoTP8WDyWvsUvbfHbcr9qSZuYpSKZjUQTvdFf6eqznHGEwhZApWfvXu6zjGCxYCp65F4jsVYYJjkzbjmkCg5WAwN5voudngA23kMK6PpTNygapCzXt" }

View File

@ -69,7 +69,8 @@ die("Can't calculate SHA256 of ${project}.update\n") unless $sha256 =~ m/(\S{64}
chomp $sha256;
# long-form commit hash of HEAD on auto-update branch
my $update_hash = `git rev-parse refs/heads/auto-update-${commit_hash}`;
#my $update_hash = `git rev-parse refs/heads/auto-update-${commit_hash}`;
my $update_hash = `git rev-parse origin/auto-update-${commit_hash}`;
die("Can't find commit hash for HEAD on auto-update-${commit_hash} branch\n") if ! defined $update_hash;
chomp $update_hash;
@ -132,11 +133,57 @@ my $signed_tx = `curl --silent -H "accept: text/plain" -H "Content-Type: applica
die("Can't sign raw transaction:\n$signed_tx\n") unless $signed_tx =~ m/^\w{390,410}$/; # +90ish longer than $raw_tx
printf "\nSigned transaction:\n%s\n", $signed_tx;
# Check we can actually fetch update
# Get the origin URL - So that we will be able to TEST the obtaining of the qortal.update...
my $origin = `git remote get-url origin`;
die("Unable to get github url for 'origin'?\n") unless $origin && $origin =~ m/:(.*)\.git$/;
my $repo = $1;
chomp $origin; # Remove any trailing newlines
die("Unable to get github url for 'origin'?\n") unless $origin;
# Debug: Print the origin URL
print "Full Origin URL: $origin\n";
# Extract the repository path (e.g., Qortal/qortal) NOTE - github is case-sensitive with repo names
my $repo;
if ($origin =~ m/[:\/]([\w\-]+\/[\w\-]+)\.git$/) {
$repo = $1;
print "Extracted direct repository path: $repo\n";
if ($repo =~ m/^qortal\//i) {
$repo =~ s/^qortal\//Qortal\//;
print "Corrected repository path capitalization: $repo\n";
}
print "Please verify the direct repository path. Current: '$repo'\n";
print "If incorrect, input the correct direct repository path (e.g., 'Qortal/qortal' or 'bob/qortal').NOTE - github is CASE SENSITIVE for repository urls... Press Enter to keep the extracted version: ";
my $input = <STDIN>;
if ($input =~ m/^qortal\//i) {
$input =~ s/^qortal\//Qortal\//;
print "Corrected repository path capitalization: $repo\n";
}
chomp $input;
$repo = $input if $input; # Update repo if user provides input
} else {
# Default to qortal/qortal if extraction fails
$repo = "Qortal/qortal";
print "Failed to extract repository path from origin URL. Using default: $repo\n";
# Prompt the user for confirmation or input
print "Please verify the repository path. Current: '$repo'\n";
print "If incorrect, input the correct repository path (e.g., 'Qortal/qortal' or 'BobsCodeburgers/qortal'). NOTE - GitHub is CASE SENSITIVE for repository urls... Press Enter to keep the default: ";
my $input = <STDIN>;
if ($input =~ m/^qortal\//i) {
$input =~ s/^qortal\//Qortal\//;
print "Corrected repository path capitalization: $repo\n";
}
chomp $input;
$repo = $input if $input; # Update repo if user provides input
}
# Debug: Print the final repository path
print "Final direct repository path: $repo\n";
# Construct the update URL
my $update_url = "https://github.com/${repo}/raw/${update_hash}/${project}.update";
print "Final update URL: $update_url\n";
my $fetch_result = `curl --silent -o /dev/null --location --range 0-1 --head --write-out '%{http_code}' --url ${update_url}`;
die("\nUnable to fetch update from ${update_url}\n") if $fetch_result ne '200';