autowow 0.9.5 → 0.9.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/README.md +2 -1
- data/lib/autowow/features/gem.rb +54 -21
- data/lib/autowow/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: 475fc48c1167d733a6ad51b87386286a2ab4e590
|
4
|
+
data.tar.gz: a6432265b980ab8cdeef327fc834b32118632e0f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8e79814e744d6b871dd7908885fc35bb888a444bd1e3383776e5a51dd911701f14f97351d684545dedf212e2e17a64afc63408e95f1485cd74c914ed13e7f5ea
|
7
|
+
data.tar.gz: 5a03fc636bccdcc46fd4f58dffadf0168e0845a8416c36f1e119665794b9b2aec303256120f8bb6211952b8ef8d4b6c2232cac95083a39aac9b7b89e6be1c4dd
|
data/README.md
CHANGED
@@ -3,7 +3,7 @@
|
|
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.
|
6
|
+
*You are viewing the README of version [v0.10.0](https://github.com/thisismydesign/autowow/releases/tag/v0.10.0). You can find other releases [here](https://github.com/thisismydesign/autowow/releases).*
|
7
7
|
<!--- Version informartion end -->
|
8
8
|
|
9
9
|
| Branch | Status |
|
@@ -112,6 +112,7 @@ Day starter routine for a new start
|
|
112
112
|
* Commits and pushed changes to `master`
|
113
113
|
* Rebases `release` branch to master
|
114
114
|
* Releases gem via `rake release`
|
115
|
+
* Changes version information to development in README if present
|
115
116
|
|
116
117
|
Prerequisites: on master
|
117
118
|
|
data/lib/autowow/features/gem.rb
CHANGED
@@ -19,7 +19,7 @@ module Autowow
|
|
19
19
|
|
20
20
|
if version
|
21
21
|
pretty_with_output.run(bump(version))
|
22
|
-
|
22
|
+
bump_readme_version_information(version)
|
23
23
|
pretty.run(add(["README.md", "*version.rb"]))
|
24
24
|
pretty.run(commit("Bumps version to v#{version}"))
|
25
25
|
end
|
@@ -32,6 +32,11 @@ module Autowow
|
|
32
32
|
pretty_with_output.run(release)
|
33
33
|
end
|
34
34
|
|
35
|
+
if version && change_readme_version_information_to_development(version)
|
36
|
+
pretty.run(add(["README.md"]))
|
37
|
+
pretty.run(commit("Changes README to development version"))
|
38
|
+
end
|
39
|
+
|
35
40
|
pretty_with_output.run(git_status)
|
36
41
|
end
|
37
42
|
|
@@ -55,28 +60,56 @@ module Autowow
|
|
55
60
|
Autowow::Executor.pretty_with_output.run(["bundle", "exec"] + cmd)
|
56
61
|
end
|
57
62
|
|
58
|
-
def
|
63
|
+
def bump_readme_version_information(version)
|
59
64
|
readme = File.new("README.md")
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
end
|
76
|
-
|
77
|
-
text.gsub!(version_information, new_version_information)
|
78
|
-
File.write(readme, text)
|
65
|
+
return unless File.file?(readme)
|
66
|
+
text = File.read(readme)
|
67
|
+
return unless contains_version_information?(text)
|
68
|
+
|
69
|
+
version_information = get_version_information(text)
|
70
|
+
|
71
|
+
new_version_information = if version_information.include?("development version")
|
72
|
+
releases_link = version_information.match(/\[.+\]\(.+\)/)[0].split("(")[1].split("/tag")[0]
|
73
|
+
<<-HEREDOC
|
74
|
+
<!--- Version informartion -->
|
75
|
+
*You are viewing the README of version [v#{version}](#{releases_link}/tag/v#{version}). You can find other releases [here](#{releases_link}).*
|
76
|
+
<!--- Version informartion end -->
|
77
|
+
HEREDOC
|
78
|
+
else
|
79
|
+
version_information.gsub(/[0-9]\.[0-9]\.[0-9]/, version)
|
79
80
|
end
|
81
|
+
|
82
|
+
text.gsub!(version_information, new_version_information)
|
83
|
+
File.write(readme, text)
|
84
|
+
end
|
85
|
+
|
86
|
+
def change_readme_version_information_to_development(version)
|
87
|
+
readme = File.new("README.md")
|
88
|
+
return false unless File.file?(readme)
|
89
|
+
text = File.read(readme)
|
90
|
+
return false unless contains_version_information?(text)
|
91
|
+
version_information = get_version_information(text)
|
92
|
+
return false if version_information.include?("development version")
|
93
|
+
|
94
|
+
releases_link = version_information.match(/\[.+\]\(.+\)/)[0].split("(")[1].split("/tag")[0]
|
95
|
+
|
96
|
+
new_version_information = <<-HEREDOC
|
97
|
+
<!--- Version informartion -->
|
98
|
+
*You are viewing the README of the development version. You can find the README of the latest release (v#{version}) [here](#{releases_link}/tag/v#{version}).*
|
99
|
+
<!--- Version informartion end -->
|
100
|
+
HEREDOC
|
101
|
+
|
102
|
+
text.gsub!(version_information, new_version_information)
|
103
|
+
File.write(readme, text)
|
104
|
+
true
|
105
|
+
end
|
106
|
+
|
107
|
+
def contains_version_information?(text)
|
108
|
+
text.match(/<!--- Version informartion -->(.+)<!--- Version informartion end -->/m).length > 0
|
109
|
+
end
|
110
|
+
|
111
|
+
def get_version_information(text)
|
112
|
+
text.match(/<!--- Version informartion -->(.+)<!--- Version informartion end -->/m)[0]
|
80
113
|
end
|
81
114
|
|
82
115
|
include ReflectionUtils::CreateModuleFunctions
|
data/lib/autowow/version.rb
CHANGED