-
Notifications
You must be signed in to change notification settings - Fork 0
/
Rakefile
64 lines (50 loc) · 1.49 KB
/
Rakefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
# frozen_string_literal: true
require 'rake_leiningen'
require 'yaml'
require 'uri'
require_relative 'lib/leiningen_task_set'
task default: %i[library:check library:test:unit]
RakeLeiningen.define_installation_tasks(
version: '2.10.0'
)
namespace :library do
define_check_tasks(fix: true)
namespace :test do
RakeLeiningen.define_test_task(
name: :unit,
type: 'unit',
profile: 'test')
end
namespace :publish do
RakeLeiningen.define_release_task(
name: :release,
profile: 'release') do |t|
t.environment = {
'VERSION' => ENV['VERSION'],
'CLOJARS_DEPLOY_USERNAME' => ENV['CLOJARS_DEPLOY_USERNAME'],
'CLOJARS_DEPLOY_TOKEN' => ENV['CLOJARS_DEPLOY_TOKEN']
}
end
end
desc 'Lint all src files'
task :lint do
puts "Running clj-kondo from ./scripts/lint for " + RUBY_PLATFORM
platform_prefix = /darwin/ =~ RUBY_PLATFORM ? "mac" : "linux"
sh("./scripts/lint/clj-kondo-2021-06-18-#{platform_prefix}",
"--lint", "src/")
puts "Finished running clj-kondo"
end
desc 'Reformat all src files'
task :format do
puts "Running cljstyle from ./scripts/lint for " + RUBY_PLATFORM
platform_prefix = /darwin/ =~ RUBY_PLATFORM ? "mac" : "linux"
sh("./scripts/lint/cljstyle-0-15-0-#{platform_prefix}", "fix")
puts "Finished running cljstyle"
end
task :optimise do
puts 'skipping optimise...'
end
task :idiomise do
puts 'skipping idiomise...'
end
end