diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..dc5e687 --- /dev/null +++ b/Makefile @@ -0,0 +1,22 @@ + +PROGNAME=noozoid +BUILD_DIR=_build + +all: help + +build: # ## build binary + mkdir -p $(BUILD_DIR) + crystal build -o $(BUILD_DIR)/$(PROGNAME) src/main.cr + +help: ## print this help + @echo "Usage: make " + @echo "" + @echo "With one of following targets:" + @echo "" + @awk 'BEGIN {FS = ":.*?## "} \ + /^[a-zA-Z_-]+:.*?## / \ + { sub("\\\\n",sprintf("\n%22c"," "), $$2); \ + printf("\033[36m%-20s\033[0m %s\n", $$1, $$2); \ + }' $(MAKEFILE_LIST) + @echo "" + diff --git a/Rakefile b/Rakefile deleted file mode 100644 index 289e643..0000000 --- a/Rakefile +++ /dev/null @@ -1,28 +0,0 @@ -require "bundler/gem_tasks" -require "rake/testtask" -require 'rubocop/rake_task' - -# Add additional test suite definitions to the default test task here -namespace :spec do - desc 'Runs RuboCop on specified directories' - RuboCop::RakeTask.new(:rubocop) do |task| - # Dirs: app, lib, test - task.patterns = ['exe/**/*.rb', 'lib/**/*.rb', 'spec/**/*_spec.rb'] - - # Make it easier to disable cops. - task.options << "--display-cop-names" - - # Abort on failures (fix your code first) - task.fail_on_error = true - end -end - -Rake::TestTask.new(:spec) do |t| - t.libs << "spec" - t.libs << "lib" - t.test_files = FileList['spec/**/*_spec.rb'] -end - -Rake::Task[:spec].enhance ['spec:rubocop'] - -task :default => :spec