hiiro 0.1.249 → 0.1.250
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/bin/h-notify +0 -5
- data/lib/hiiro/version.rb +1 -1
- data/script/publish +45 -5
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: d3f5fb0378b3b9bd8e645de5b79a62bb2889973ddacc61dd7d0e6298321276c8
|
|
4
|
+
data.tar.gz: 6371301df6ad7c512750bba608f2d2357b65ec111cf73e32b82779a29e0abdc9
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 39a22086d443f5668ff5657c8b8c22c2369ebcc98172d9beffaa7d7a546fa743fd79e994908ed95730da0313387d1d77a6522e7028b5705432c847d40e0e393e
|
|
7
|
+
data.tar.gz: bd7346c48f4ca70e365024f514a4b2b261bcc2fe215788b50f6c0f8834cb31cb9fa41e0ea9f72f7ad516668bdaccddbaf0c70b64e4cec54cd0783a32c5440e17
|
data/bin/h-notify
CHANGED
|
@@ -98,7 +98,6 @@ Hiiro.run(*ARGV, tasks: true) do
|
|
|
98
98
|
data[session].unshift(entry)
|
|
99
99
|
write_log(data)
|
|
100
100
|
|
|
101
|
-
tmux_client.display_message("#{@preset[:prefix]} #{message}")
|
|
102
101
|
system('terminal-notifier',
|
|
103
102
|
'-title', @preset[:title],
|
|
104
103
|
'-message', message,
|
|
@@ -136,7 +135,6 @@ Hiiro.run(*ARGV, tasks: true) do
|
|
|
136
135
|
entries = data[session] || []
|
|
137
136
|
|
|
138
137
|
if entries.empty?
|
|
139
|
-
tmux_client.display_message('No notifications')
|
|
140
138
|
next
|
|
141
139
|
end
|
|
142
140
|
|
|
@@ -166,14 +164,12 @@ Hiiro.run(*ARGV, tasks: true) do
|
|
|
166
164
|
entries = data[session] || []
|
|
167
165
|
|
|
168
166
|
if index >= entries.length
|
|
169
|
-
tmux_client.display_message('Notification not found')
|
|
170
167
|
next
|
|
171
168
|
end
|
|
172
169
|
|
|
173
170
|
entry = entries[index]
|
|
174
171
|
|
|
175
172
|
unless pane_exists?(entry['pane_id'])
|
|
176
|
-
tmux_client.display_message("Pane #{entry['pane_id']} no longer exists")
|
|
177
173
|
entries.delete_at(index)
|
|
178
174
|
data[session] = entries
|
|
179
175
|
write_log(data)
|
|
@@ -193,7 +189,6 @@ Hiiro.run(*ARGV, tasks: true) do
|
|
|
193
189
|
data = read_log
|
|
194
190
|
data.delete(session)
|
|
195
191
|
write_log(data)
|
|
196
|
-
tmux_client.display_message('Notifications cleared')
|
|
197
192
|
end
|
|
198
193
|
|
|
199
194
|
# Called by tmux hook: after-kill-pane
|
data/lib/hiiro/version.rb
CHANGED
data/script/publish
CHANGED
|
@@ -17,6 +17,7 @@ if behind > 0
|
|
|
17
17
|
exit 1
|
|
18
18
|
end
|
|
19
19
|
|
|
20
|
+
puts ""
|
|
20
21
|
# Fetch all published versions from RubyGems
|
|
21
22
|
def fetch_versions
|
|
22
23
|
uri = URI("https://rubygems.org/api/v1/versions/hiiro.json")
|
|
@@ -79,6 +80,40 @@ end
|
|
|
79
80
|
|
|
80
81
|
puts "New version: #{new_version}"
|
|
81
82
|
|
|
83
|
+
puts ""
|
|
84
|
+
puts "Generating CHANGELOG.md..."
|
|
85
|
+
last_tag = `git describe --tags --abbrev=0 2>/dev/null`.strip
|
|
86
|
+
commit_log = last_tag.empty? ? `git log --oneline` : `git log #{last_tag}..HEAD --oneline`
|
|
87
|
+
existing_changelog = File.exist?('CHANGELOG.md') ? File.read('CHANGELOG.md') : ''
|
|
88
|
+
|
|
89
|
+
changelog_prompt = <<~PROMPT
|
|
90
|
+
Update or create a CHANGELOG.md for the Ruby gem "hiiro" version #{new_version}.
|
|
91
|
+
|
|
92
|
+
Recent commits (since #{last_tag.empty? ? 'the beginning' : last_tag}):
|
|
93
|
+
#{commit_log.strip}
|
|
94
|
+
|
|
95
|
+
Existing CHANGELOG.md:
|
|
96
|
+
#{existing_changelog.empty? ? '(none)' : existing_changelog}
|
|
97
|
+
|
|
98
|
+
Write the complete updated CHANGELOG.md. Add a new section for v#{new_version} at the top
|
|
99
|
+
with today's date. Group changes into Added, Changed, Fixed, Removed where appropriate.
|
|
100
|
+
Be concise. Output only the file content, no explanation.
|
|
101
|
+
PROMPT
|
|
102
|
+
|
|
103
|
+
new_changelog = IO.popen(['claude', '-p', '--model', 'claude-haiku-4-5-20251001'], 'r+') { |io|
|
|
104
|
+
io.write(changelog_prompt)
|
|
105
|
+
io.close_write
|
|
106
|
+
io.read
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
if new_changelog && !new_changelog.strip.empty?
|
|
110
|
+
File.write('CHANGELOG.md', new_changelog)
|
|
111
|
+
puts "Updated CHANGELOG.md"
|
|
112
|
+
else
|
|
113
|
+
puts "Warning: could not generate CHANGELOG.md"
|
|
114
|
+
end
|
|
115
|
+
|
|
116
|
+
puts ""
|
|
82
117
|
File.open('lib/hiiro/version.rb', 'w+') do |f|
|
|
83
118
|
f.puts 'class Hiiro'
|
|
84
119
|
f.puts " VERSION = #{new_version.inspect}"
|
|
@@ -86,13 +121,13 @@ File.open('lib/hiiro/version.rb', 'w+') do |f|
|
|
|
86
121
|
end
|
|
87
122
|
|
|
88
123
|
built = system('gem', 'build', 'hiiro.gemspec')
|
|
89
|
-
|
|
90
124
|
puts "\nERROR: unable to build gem\n" unless built
|
|
91
125
|
|
|
126
|
+
puts ""
|
|
92
127
|
pushed = system('gem', 'push', "hiiro-#{new_version}.gem")
|
|
93
|
-
|
|
94
128
|
puts "\nERROR: unable to push\n" unless pushed
|
|
95
129
|
|
|
130
|
+
puts ""
|
|
96
131
|
system 'git', 'add', '--all'
|
|
97
132
|
if has_pending_changes
|
|
98
133
|
system 'git', 'commit'
|
|
@@ -100,13 +135,17 @@ else
|
|
|
100
135
|
system 'git', 'commit', '-m', "publishing v#{new_version}"
|
|
101
136
|
end
|
|
102
137
|
|
|
103
|
-
|
|
104
|
-
|
|
138
|
+
system 'git', 'tag', '-a', "v#{new_version}", '-m', "v#{new_version}"
|
|
139
|
+
puts "Tagged v#{new_version}"
|
|
140
|
+
|
|
141
|
+
puts ""
|
|
142
|
+
# Try to push to origin main (tags follow via push.followTags), fallback to a branch if needed
|
|
143
|
+
if system('git', 'push', 'origin', 'main', '--follow-tags')
|
|
105
144
|
puts "Pushed to origin/main"
|
|
106
145
|
else
|
|
107
146
|
branch_name = "publish-v#{new_version}"
|
|
108
147
|
system 'git', 'checkout', '-b', branch_name
|
|
109
|
-
if system('git', 'push', 'origin', branch_name)
|
|
148
|
+
if system('git', 'push', 'origin', branch_name, '--follow-tags')
|
|
110
149
|
puts "Push to main failed. Pushed to origin/#{branch_name} instead"
|
|
111
150
|
else
|
|
112
151
|
puts "\nERROR: unable to push to origin\n"
|
|
@@ -114,4 +153,5 @@ else
|
|
|
114
153
|
system 'git', 'checkout', 'main'
|
|
115
154
|
end
|
|
116
155
|
|
|
156
|
+
puts ""
|
|
117
157
|
system('./script/update')
|