bin/mach5 in mach5-tools-0.2.2 vs bin/mach5 in mach5-tools-0.3.0
- old
+ new
@@ -38,9 +38,25 @@
else
runner.chart(all: options.all)
end
end
+ desc "version", "Print the version"
+ def version
+ puts "v#{File.open(File.join(File.dirname(__FILE__), "../VERSION")).readlines.join}"
+ end
+
+ desc "init", "Create an initial Mach5file"
+ def init
+ if File.exists?("Mach5file")
+ puts "There is already a Mach5file. If you want to overwrite it, try to remove it first and then generate a new one."
+ else
+ File.open("Mach5file", "w") do |f|
+ f.write(File.open(File.join(File.dirname(__FILE__), "../lib/templates/Mach5file")).readlines.join.gsub("{{PROJECT_NAME}}", File.basename(Dir.getwd)))
+ end
+ end
+ end
+
default_task :benchmark
end
App.start
\ No newline at end of file