autowow 0.9.4 → 0.9.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +8 -1
- data/lib/autowow/cli.rb +2 -2
- data/lib/autowow/commands/gem.rb +4 -0
- data/lib/autowow/commands/vcs.rb +8 -0
- data/lib/autowow/features/gem.rb +34 -1
- data/lib/autowow/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c7482fff9d153970c14373eb4d5b3dbab430445d
|
4
|
+
data.tar.gz: 3a1ffc1ae8e52213ed88bacf2985e030ca8b8a99
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2379b4578f694a293015968c6fa151ea5a378a40c2eaf48f9bf1dc0836ceb1ce6e0fbfc5c7ca971494a99de61b9d0c32f04cd11c6b6fc898c6759007ed7ea5ff
|
7
|
+
data.tar.gz: de34bb3e6843016bd04a7683d18e7ade9b5d10435ad0d4797cde23797f0163fb57bee42cc122f1bb8d5071c479ab546dca2e4edc1dfae2778dfe24447283bbd3
|
data/README.md
CHANGED
@@ -2,7 +2,9 @@
|
|
2
2
|
|
3
3
|
#### Set of commands to [auto]mate [w]ay [o]f [w]orking
|
4
4
|
|
5
|
-
|
5
|
+
<!--- Version informartion -->
|
6
|
+
*You are viewing the README of version [v0.9.5](https://github.com/thisismydesign/autowow/releases/tag/v0.9.5). You can find other releases [here](https://github.com/thisismydesign/autowow/releases).*
|
7
|
+
<!--- Version informartion end -->
|
6
8
|
|
7
9
|
| Branch | Status |
|
8
10
|
| ------ | ------ |
|
@@ -103,6 +105,11 @@ Day starter routine for a new start
|
|
103
105
|
|
104
106
|
`aw grls` / `autowow gem_release`
|
105
107
|
|
108
|
+
* Pulls chnages on `master`
|
109
|
+
* If version parameter is provided
|
110
|
+
* Bumps version in version.rb
|
111
|
+
* Bumps version information in README if present
|
112
|
+
* Commits and pushed changes to `master`
|
106
113
|
* Rebases `release` branch to master
|
107
114
|
* Releases gem via `rake release`
|
108
115
|
|
data/lib/autowow/cli.rb
CHANGED
@@ -30,8 +30,8 @@ module Autowow
|
|
30
30
|
end
|
31
31
|
|
32
32
|
desc "gem_release", "release gem and return to master"
|
33
|
-
def gem_release
|
34
|
-
Autowow::Features::Gem.gem_release
|
33
|
+
def gem_release(version = nil)
|
34
|
+
Autowow::Features::Gem.gem_release(version)
|
35
35
|
end
|
36
36
|
|
37
37
|
desc "update_projects", "updates idle projects"
|
data/lib/autowow/commands/gem.rb
CHANGED
@@ -13,6 +13,10 @@ module Autowow
|
|
13
13
|
be + ["rubocop", "--parallel"]
|
14
14
|
end
|
15
15
|
|
16
|
+
def bump(version = nil)
|
17
|
+
(["gem", "bump", "--no-commit"] + [version]).reject(&:nil?)
|
18
|
+
end
|
19
|
+
|
16
20
|
def rubocop_autocorrect(files)
|
17
21
|
cmd = be + ["rubocop", "--auto-correct"]
|
18
22
|
if files.kind_of?(Array)
|
data/lib/autowow/commands/vcs.rb
CHANGED
@@ -9,6 +9,10 @@ module Autowow
|
|
9
9
|
["--no-pager"]
|
10
10
|
end
|
11
11
|
|
12
|
+
def commit (msg)
|
13
|
+
cmd + ["commit", "-m", msg]
|
14
|
+
end
|
15
|
+
|
12
16
|
def changes_not_on_remote(branch)
|
13
17
|
cmd + terminal_options + ["log", branch, "--not", "--remotes"]
|
14
18
|
end
|
@@ -81,6 +85,10 @@ module Autowow
|
|
81
85
|
cmd + ["remote", "add", name, url]
|
82
86
|
end
|
83
87
|
|
88
|
+
def add(patterns)
|
89
|
+
cmd + ["add"] + patterns
|
90
|
+
end
|
91
|
+
|
84
92
|
include ReflectionUtils::CreateModuleFunctions
|
85
93
|
end
|
86
94
|
end
|
data/lib/autowow/features/gem.rb
CHANGED
@@ -11,10 +11,19 @@ module Autowow
|
|
11
11
|
include Commands::Vcs
|
12
12
|
include Executor
|
13
13
|
|
14
|
-
def gem_release
|
14
|
+
def gem_release(version = nil)
|
15
15
|
pretty_with_output.run(git_status)
|
16
16
|
start_branch = Vcs.working_branch
|
17
17
|
logger.error("Not on master.") and return unless start_branch.eql?("master")
|
18
|
+
pretty.run(pull)
|
19
|
+
|
20
|
+
if version
|
21
|
+
pretty_with_output.run(bump(version))
|
22
|
+
update_readme_version_information(version)
|
23
|
+
pretty.run(add(["README.md", "*version.rb"]))
|
24
|
+
pretty.run(commit("Bumps version to v#{version}"))
|
25
|
+
end
|
26
|
+
|
18
27
|
pretty.run(push)
|
19
28
|
|
20
29
|
Vcs.on_branch("release") do
|
@@ -46,6 +55,30 @@ module Autowow
|
|
46
55
|
Autowow::Executor.pretty_with_output.run(["bundle", "exec"] + cmd)
|
47
56
|
end
|
48
57
|
|
58
|
+
def update_readme_version_information(version)
|
59
|
+
readme = File.new("README.md")
|
60
|
+
if File.file?(readme)
|
61
|
+
text = File.read(readme)
|
62
|
+
matches = text.match(/<!--- Version informartion -->(.+)<!--- Version informartion end -->/m)
|
63
|
+
return if matches.length == 0
|
64
|
+
version_information = matches[0]
|
65
|
+
|
66
|
+
new_version_information = if version_information.include?("development version")
|
67
|
+
releases_link = version_information.match(/\[.+\]\(.+\)/)[0].split("(")[1].split("/tag")[0]
|
68
|
+
<<-HEREDOC
|
69
|
+
<!--- Version informartion -->
|
70
|
+
*You are viewing the README of version [v#{version}](#{releases_link}/tag/v#{version}). You can find other releases [here](#{releases_link}).*
|
71
|
+
<!--- Version informartion end -->
|
72
|
+
HEREDOC
|
73
|
+
else
|
74
|
+
version_information.gsub(/[0-9]\.[0-9]\.[0-9]/, version)
|
75
|
+
end
|
76
|
+
|
77
|
+
text.gsub!(version_information, new_version_information)
|
78
|
+
File.write(readme, text)
|
79
|
+
end
|
80
|
+
end
|
81
|
+
|
49
82
|
include ReflectionUtils::CreateModuleFunctions
|
50
83
|
end
|
51
84
|
end
|
data/lib/autowow/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: autowow
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.9.
|
4
|
+
version: 0.9.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- thisismydesign
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-06-
|
11
|
+
date: 2018-06-10 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: easy_logging
|