herkko 0.0.3 → 0.0.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/herkko/runner.rb +32 -9
- data/lib/herkko/travis.rb +1 -1
- data/lib/herkko/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: dbf0c54b591fdc987afc4f25d41056e58b52cfa3
|
4
|
+
data.tar.gz: 1c9186aa1f643505e66a9f1214cb42e4985d7517
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ba4ba588eefdf5b39271c610d48a2c282747c8f15c6f47e4f649b92cb192764a55a7ab79783e4d228e5d9e8ab41dc0db871ceb5ab094e96d4ef50f98d180bb47
|
7
|
+
data.tar.gz: bb2c0389b83532c3361789eff1e27958c9a8e875ebae4db6cff8818e139d84634cf06669724fafaf54c0aeec7aae322719e7a1a1a1506d0466688e335281b36a
|
data/lib/herkko/runner.rb
CHANGED
@@ -15,7 +15,11 @@ module Herkko
|
|
15
15
|
|
16
16
|
def run
|
17
17
|
if ["version", "--version"].include?(environment)
|
18
|
-
return
|
18
|
+
return print_version
|
19
|
+
end
|
20
|
+
|
21
|
+
if ["help", "--help"].include?(environment)
|
22
|
+
return print_usage
|
19
23
|
end
|
20
24
|
|
21
25
|
return print_usage if environment.nil? || command.nil?
|
@@ -27,15 +31,34 @@ module Herkko
|
|
27
31
|
end
|
28
32
|
end
|
29
33
|
|
30
|
-
def
|
34
|
+
def print_version
|
31
35
|
Herkko.puts "Herkko #{Herkko::VERSION}"
|
32
36
|
end
|
33
37
|
|
34
38
|
def print_usage
|
35
39
|
Herkko.puts <<END
|
36
|
-
Herkko
|
40
|
+
# Herkko
|
41
|
+
|
42
|
+
Run `herkko [remote name] [command]` for example `herkko production deploy`.
|
43
|
+
|
44
|
+
There are special commands like `deploy` is a special command that does extra checks. Other commands
|
45
|
+
are just proxied to the heroku CLI tool (for example `herkko production logs`).
|
46
|
+
|
47
|
+
## Naming remotes
|
48
|
+
|
49
|
+
It's recommended to name your remotes for example production & staging. Then you can always just type `herkko production deploy` to release a new version.
|
50
|
+
|
51
|
+
## Commands
|
52
|
+
|
53
|
+
console | Opens Rails console
|
54
|
+
deploy | Deploys new version
|
55
|
+
seed | Runs seeds.rb
|
56
|
+
migrate | Run migrations and restarts the app
|
57
|
+
|
58
|
+
### deploy
|
59
|
+
|
60
|
+
--skip-ci-check - Skips the Travis CI build status check
|
37
61
|
|
38
|
-
Run `herkko [environment] [command]` for example `herkko production deploy`.
|
39
62
|
END
|
40
63
|
end
|
41
64
|
|
@@ -78,11 +101,6 @@ END
|
|
78
101
|
Herkko.run_with_output "heroku run rake db:seed -r #{environment}"
|
79
102
|
end
|
80
103
|
|
81
|
-
def check_ci
|
82
|
-
Herkko.info "Checking CI..."
|
83
|
-
Herkko::Travis.status_for(current_branch)
|
84
|
-
end
|
85
|
-
|
86
104
|
def migrate
|
87
105
|
Herkko.info "Migrating database..."
|
88
106
|
Herkko.run_with_output %{
|
@@ -100,6 +118,11 @@ END
|
|
100
118
|
|
101
119
|
private
|
102
120
|
|
121
|
+
def check_ci
|
122
|
+
Herkko.info "Checking CI..."
|
123
|
+
Herkko::Travis.status_for(current_branch)
|
124
|
+
end
|
125
|
+
|
103
126
|
def deploy!
|
104
127
|
run_migrations = migrations_needed?
|
105
128
|
push_new_code
|
data/lib/herkko/travis.rb
CHANGED
data/lib/herkko/version.rb
CHANGED