]> git.ipfire.org Git - thirdparty/moment.git/commitdiff
Fix nuget-publish task
authorIskren Chernev <iskren.chernev@gmail.com>
Thu, 10 Nov 2016 07:30:38 +0000 (23:30 -0800)
committerIskren Chernev <iskren.chernev@gmail.com>
Thu, 10 Nov 2016 07:30:38 +0000 (23:30 -0800)
tasks/nuget.js

index bc1bf44cef6e0046e175ed0b2e29b7acf344edf0..d67796c2733ab92f34579fc393320fa21d2b1f97 100644 (file)
@@ -22,6 +22,14 @@ module.exports = function (grunt) {
             dest: './'
         }
     });
+    grunt.registerTask('nugetkey_pre', function () {
+        grunt.option('key', process.env.NUGET_KEY);
+        grunt.option('source', "https://www.nuget.org/api/v2/package");
+    });
+    grunt.registerTask('nugetkey_post', function () {
+        grunt.option('key', null);
+        grunt.option('source', null);
+    });
     grunt.config('nugetpush', {
         dist: {
             src: 'Moment.js.*.nupkg'
@@ -32,6 +40,6 @@ module.exports = function (grunt) {
     });
 
     grunt.registerTask('nuget-publish', [
-        'nugetpack', 'nugetpush', 'clean:nuget'
+        'nugetpack', 'nugetkey_pre', 'nugetkey', 'nugetkey_post', 'nugetpush', 'clean:nuget'
     ]);
 };