Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions bin/download-OPL-metadata-release.pl
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,10 @@ BEGIN
die "The WeBWorK temporary directory $ce->{webworkDirs}{tmp} does not exist or is not writable."
if (!-d $ce->{webworkDirs}{tmp} || !-w $ce->{webworkDirs}{tmp});

my $releaseDataFF =
File::Fetch->new(uri => 'https://api.github.com/repos/openwebwork/webwork-open-problem-library/releases/latest');
# Set the OPL_METADATA_RELEASE_API_URL environment variable to override the release API URL,
# for example, for sites that use a fork of the OPL.
my $releaseDataFF = File::Fetch->new(uri => $ENV{OPL_METADATA_RELEASE_API_URL}
// 'https://api.github.com/repos/openwebwork/webwork-open-problem-library/releases/latest');
my $file = $releaseDataFF->fetch(to => $ce->{webworkDirs}{tmp}) or die $releaseDataFF->error;
my $path = Mojo::File->new($file);
my $releaseData = decode_json($path->slurp);
Expand Down