toys-release 0.1.0 → 0.1.1
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
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: a3ff3cf2eca9706959eddfb418f6b32a26be0b6b38729060daf8eea59b328a22
|
|
4
|
+
data.tar.gz: 7859d5108f62f3cfe45107aaf737ca278866d07edab8d7cdf678ff9e5b6c5124
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 794cd275768b4a657558527699cb1c5fd1ca628115cf144e30b9f4c2f4ac10ab939381203c1784cc5d92cfaa05c39f9c2999d799c9334140b64765989b7d9850
|
|
7
|
+
data.tar.gz: 18c092ffbfc0489fd064548778350bf22cc3cb2f436aa02bc23c9a4488879768dc3b875b92de8440306c8ef20142c148a46ee331e67e8983703c5efe7ed47fc1
|
data/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,10 @@
|
|
|
1
1
|
# Release History
|
|
2
2
|
|
|
3
|
+
### v0.1.1 / 2025-11-09
|
|
4
|
+
|
|
5
|
+
* FIXED: The gen-gh-pages script now generates the correct redirect paths on a non-monorepo with the default directory structure
|
|
6
|
+
* FIXED: The gen-gh-pages script no longer exits abnormally if no changes were made
|
|
7
|
+
|
|
3
8
|
### v0.1.0 / 2025-11-09
|
|
4
9
|
|
|
5
10
|
Initial release of the toys-release gem
|
data/lib/toys/release/version.rb
CHANGED
|
@@ -5,21 +5,21 @@
|
|
|
5
5
|
</head>
|
|
6
6
|
<body>
|
|
7
7
|
<p>
|
|
8
|
-
<a href="https://<%= @
|
|
8
|
+
<a href="https://<%= @comp_info.first.first %>/index.html">Main documentation page</a>
|
|
9
9
|
</p>
|
|
10
10
|
</body>
|
|
11
11
|
<script>
|
|
12
|
-
<% @
|
|
12
|
+
<% @comp_info.values.uniq.each do |version_var| %> var <%= version_var %> = "0.0.0";
|
|
13
13
|
<% end %> var location_updated = false;
|
|
14
|
-
<% @
|
|
14
|
+
<% @comp_info.each do |(url_base, version_var)| %> if (!location_updated && window.location.href.includes("//<%= url_base %>/latest")) {
|
|
15
15
|
var loc = window.location.href.replace(
|
|
16
|
-
"//<%=
|
|
17
|
-
"//<%=
|
|
16
|
+
"//<%= url_base %>/latest",
|
|
17
|
+
"//<%= url_base %>/v" + <%= version_var %>);
|
|
18
18
|
window.location.replace(loc);
|
|
19
19
|
location_updated = true;
|
|
20
20
|
}
|
|
21
21
|
<% end %> if (!location_updated) {
|
|
22
|
-
window.location.replace("
|
|
22
|
+
window.location.replace("https://<%= @comp_info.first.first %>/latest");
|
|
23
23
|
}
|
|
24
24
|
</script>
|
|
25
25
|
</html>
|
data/toys/gen-gh-pages.rb
CHANGED
|
@@ -63,26 +63,28 @@ end
|
|
|
63
63
|
def generate_gh_pages
|
|
64
64
|
relevant_component_settings = @settings.all_component_settings.find_all(&:gh_pages_enabled)
|
|
65
65
|
url_base = "#{@settings.repo_owner}.github.io/#{@settings.repo_name}"
|
|
66
|
-
|
|
66
|
+
comp_info = relevant_component_settings.to_h do |comp|
|
|
67
|
+
[
|
|
68
|
+
comp.gh_pages_directory == "." ? url_base : "#{url_base}/#{comp.gh_pages_directory}",
|
|
69
|
+
comp.gh_pages_version_var,
|
|
70
|
+
]
|
|
71
|
+
end
|
|
67
72
|
|
|
68
73
|
::Dir.chdir(@gh_pages_dir) do
|
|
69
74
|
::File.write(".nojekyll", "")
|
|
70
75
|
generate_file("gh-pages-gitignore.erb", ".gitignore", {})
|
|
71
76
|
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
url_base: url_base,
|
|
75
|
-
default_url: default_url,
|
|
76
|
-
}
|
|
77
|
-
generate_file("gh-pages-404.html.erb", "404.html", data) do |content, old_content|
|
|
77
|
+
generate_file("gh-pages-404.html.erb", "404.html",
|
|
78
|
+
{comp_info: comp_info}) do |content, old_content|
|
|
78
79
|
update_versions(content, old_content)
|
|
79
80
|
end
|
|
80
81
|
|
|
81
|
-
generate_file("gh-pages-index.html.erb", "index.html",
|
|
82
|
+
generate_file("gh-pages-index.html.erb", "index.html",
|
|
83
|
+
{default_url: "https://#{comp_info.first.first}/latest"})
|
|
82
84
|
|
|
83
85
|
relevant_component_settings.each do |component_settings|
|
|
84
86
|
generate_file("gh-pages-empty.html.erb", "#{component_settings.gh_pages_directory}/v0.0.0/index.html",
|
|
85
|
-
{
|
|
87
|
+
{name: component_settings.name}, remove_dir: true)
|
|
86
88
|
end
|
|
87
89
|
end
|
|
88
90
|
puts "Files generated into #{@gh_pages_dir}", :bold
|
|
@@ -90,6 +92,10 @@ end
|
|
|
90
92
|
|
|
91
93
|
def push_gh_pages
|
|
92
94
|
::Dir.chdir(@gh_pages_dir) do
|
|
95
|
+
if @repository.git_clean?
|
|
96
|
+
puts "No changes made to gh-pages.", :yellow, :bold
|
|
97
|
+
return
|
|
98
|
+
end
|
|
93
99
|
@repository.git_commit("Generated initial gh-pages", signoff: @settings.signoff_commits?)
|
|
94
100
|
if dry_run
|
|
95
101
|
puts "DRY RUN: Skipped git push.", :green, :bold
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: toys-release
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.1.
|
|
4
|
+
version: 0.1.1
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Daniel Azuma
|
|
@@ -82,10 +82,10 @@ homepage: https://github.com/dazuma/toys
|
|
|
82
82
|
licenses:
|
|
83
83
|
- MIT
|
|
84
84
|
metadata:
|
|
85
|
-
changelog_uri: https://dazuma.github.io/toys/gems/toys-release/v0.1.
|
|
85
|
+
changelog_uri: https://dazuma.github.io/toys/gems/toys-release/v0.1.1/file.CHANGELOG.html
|
|
86
86
|
source_code_uri: https://github.com/dazuma/toys/tree/main/toys-release
|
|
87
87
|
bug_tracker_uri: https://github.com/dazuma/toys/issues
|
|
88
|
-
documentation_uri: https://dazuma.github.io/toys/gems/toys-release/v0.1.
|
|
88
|
+
documentation_uri: https://dazuma.github.io/toys/gems/toys-release/v0.1.1
|
|
89
89
|
rdoc_options: []
|
|
90
90
|
require_paths:
|
|
91
91
|
- lib
|