Skip to content

Commit

Permalink
ci: Allow downloading tzcode archive as well as tzdata
Browse files Browse the repository at this point in the history
  • Loading branch information
gilmoreorless committed Feb 3, 2024
1 parent 6bf33a2 commit ba275d2
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions tasks/data-download.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,12 @@ module.exports = function (grunt) {
version = version || 'latest';

var done = this.async(),
fetchCode = grunt.option('fetch-tzcode'),
type = fetchCode ? 'code' : 'data',
src = (version === 'latest' ?
'https://data.iana.org/time-zones/tzdata-latest.tar.gz' :
'https://data.iana.org/time-zones/releases/tzdata' + version + '.tar.gz'),
curl = path.resolve('temp/curl', version, 'data.tar.gz'),
'https://data.iana.org/time-zones/tz' + type + '-latest.tar.gz' :
'https://data.iana.org/time-zones/releases/tz' + type + version + '.tar.gz'),
curl = path.resolve('temp/curl', version, type + '.tar.gz'),
dest = path.resolve('temp/download', version);

grunt.file.mkdir(path.dirname(curl));
Expand Down

0 comments on commit ba275d2

Please sign in to comment.