pergament
Advanced tools
Comparing version 0.2.72 to 0.2.73
@@ -79,3 +79,6 @@ | ||
} | ||
uploadIndexFiles(_.flatten(indexFiles), callback) | ||
uploadIndexFiles(_.flatten(indexFiles), function(err){ | ||
if (err) return callback(err) | ||
s3.setVersionBuilt(buildVersion, callback) | ||
}) | ||
}) | ||
@@ -82,0 +85,0 @@ }) |
@@ -340,5 +340,20 @@ var debug = require('debug')('pergament:s3'), | ||
s3.isVersionBuilt = function(version, callback) { | ||
s3.checkDirectory(config.bucket, 'index/' + version, callback) | ||
// s3.checkDirectory(config.bucket, 'index/' + version, callback) | ||
var params = { | ||
Bucket: config.bucket, | ||
Key: 'index/' + version + '/_done' | ||
} | ||
debug('Head object %j', params) | ||
s3.api.headObject(params, function(err, obj) { | ||
if (err && err.statusCode !== 404) return callback(err) | ||
callback(null, !!obj) | ||
}) | ||
} | ||
s3.setVersionBuilt = function(version, callback) { | ||
s3.putObject('index/' + version + '/_done', 'true', 'text/plain', {}, callback) | ||
} | ||
s3.checkDirectory = function(bucket, dir, callback) { | ||
@@ -345,0 +360,0 @@ s3.list(bucket, dir, function(err, objects) { |
{ | ||
"name": "pergament", | ||
"version": "0.2.72", | ||
"version": "0.2.73", | ||
"description": "Pergament - express micro-framework for rich applications", | ||
@@ -5,0 +5,0 @@ "readmeFilename": "README.md", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
2924200
73627