From 583cdca0f99a0366bc55ae88b3961e43aa200c02 Mon Sep 17 00:00:00 2001 From: Bhavani Bheemanadham Date: Wed, 11 May 2016 17:02:57 -0500 Subject: [PATCH] updated releasinator --- .releasinator.rb | 20 +++----------------- 1 file changed, 3 insertions(+), 17 deletions(-) diff --git a/.releasinator.rb b/.releasinator.rb index 2e23ba8..65c672f 100644 --- a/.releasinator.rb +++ b/.releasinator.rb @@ -26,29 +26,15 @@ def validate_version_match() method(:validate_version_match) ] +# there are no separate build steps for PayPal-Cordova-Plugin , so it is just empty method def build_method - # run tests first - # detect non-zero failures/errors, since ruby command won't exit properly if unit tests called exit/abort - output = CommandProcessor.command("ruby test/ts_allTests.rb | cat", live_output=true) - if !output.match /assertions, 0 failures, 0 errors, 0 pendings, 0 omissions, 0 notifications$/ - Printer.fail("There were unit test failures.") - abort() - end - - output_dir = "build" - CommandProcessor.command("gem build releasinator.gemspec") - Dir.mkdir(output_dir) unless File.exists?(output_dir) - CommandProcessor.command("mv releasinator-*.gem #{output_dir}") end # The command that builds the sdk. Required. configatron.build_method = method(:build_method) def publish_to_package_manager(version) - output_dir = "build" - Dir.chdir(output_dir) do - CommandProcessor.command("gem push releasinator-#{version}.gem") - end + CommandProcessor.command("npm publish .") end # The method that publishes the sdk to the package manager. Required. @@ -56,7 +42,7 @@ def publish_to_package_manager(version) def wait_for_package_manager(version) - CommandProcessor.wait_for("wget -U \"non-empty-user-agent\" -qO- https://www.npmjs.com/package/com.paypal.cordova.mobilesdk#{version} | cat") + CommandProcessor.wait_for("wget -U \"non-empty-user-agent\" -qO- https://www.npmjs.com/package/com.paypal.cordova.mobilesdk |grep @current_release.version | cat") end # The method that waits for the package manager to be done. Required