Rakefile in cosmosc2-demo-5.0.4 vs Rakefile in cosmosc2-demo-5.0.5

- old
+ new

@@ -18,18 +18,25 @@ # copyright holder PLUGIN_NAME = Dir['*.gemspec'][0].split('.')[0..-2].join('.') task :require_version do - unless ENV['VERSION'] + if ENV['VERSION'] + if ENV['VERSION'] =~ /-/ + # Add Timestamp to prerelease versions + ENV['VERSION'] = ENV['VERSION'] + "." + Time.now.utc.strftime("%Y%m%d%H%M%S") + end + else puts "VERSION is required: rake <task> VERSION=X.X.X" exit 1 end end task :build => [:require_version] do _, platform, *_ = RUBY_PLATFORM.split("-") if platform == 'mswin32' or platform == 'mingw32' puts "Warning: Building gem on Windows will lose file permissions" end + # Build the widgets in the src directory + system("yarn run build") system("gem build #{PLUGIN_NAME}") end