dockedit 1.0.0 → 1.0.7

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: e0f5c8c02becb27646e58e86489ffaa4b577ee7a44095afc03ef61a005ca592b
4
- data.tar.gz: a3bbd0cf87acb76213674a15ff5c4b24c3227c02821c24365fe2d3e0bc66a6e7
3
+ metadata.gz: 10e6f33d3d4224795f439d6ee76c54722bc6eeca27b575a83a7214a3c3a3dc1a
4
+ data.tar.gz: 4373676233f10e951e0e9c21c10bbef6fd17e638a9d58c1b49b98a14900710f0
5
5
  SHA512:
6
- metadata.gz: 14174fbb8eff9f09c4c6196bdb270572e0d87504ee305fd63314e01d195a2a8de7f2e2e0af4586b29f056359078aa3322d61f0ec40de64847ab895caf8141b62
7
- data.tar.gz: a7a61f7fb7aa5bf175d817e0f96e540dfed0fdd05c2d31f00bc1e296b62ffb463d8af9c0e875f756327c15b58a438ff5370e74760e83c3676173f34e3c7e44be
6
+ metadata.gz: 0f38d02a4361f49846e2bd7652ecd432d37adf690305c613ae6759a79faf24aae34be463d565412b5c30ae073ee87051391fef480a31d7a2aaa05ac214b2a516
7
+ data.tar.gz: 4b2bbf1a932168e32c78d7a41b2a5837f4272902ab49770d7d069e2c026c0cceaa2f9fc188996387adb1daf2a827cc0f979ec37984937a283e75facb27e2d2a0
data/CHANGELOG.md CHANGED
@@ -1,3 +1,44 @@
1
+ ### 1.0.7
2
+
3
+ 2025-12-17 07:56
4
+
5
+ ### 1.0.6
6
+
7
+ 2025-12-17 07:53
8
+
9
+ #### FIXED
10
+
11
+ - Environment variable mismatch in release action
12
+
13
+ ### 1.0.5
14
+
15
+ 2025-12-17 07:50
16
+
17
+ ### 1.0.4
18
+
19
+ 2025-12-17 07:45
20
+
21
+ #### FIXED
22
+
23
+ - Release workflow needs write permission
24
+ - Release commit message collecting STDERR
25
+
26
+ ### 1.0.3
27
+
28
+ 2025-12-17 07:42
29
+
30
+ #### FIXED
31
+
32
+ - Release workflow
33
+
34
+ ### 1.0.2
35
+
36
+ 2025-12-17 07:40
37
+
38
+ ### 1.0.1
39
+
40
+ 2025-12-17 07:39
41
+
1
42
  ### 1.0.0
2
43
 
3
44
  2025-12-17 07:21
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- dockedit (1.0.0)
4
+ dockedit (1.0.3)
5
5
  rexml (~> 3.2)
6
6
 
7
7
  GEM
data/Rakefile CHANGED
@@ -1,6 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require 'bundler/gem_tasks'
4
3
  require 'rake'
5
4
  require 'rdoc/task'
6
5
  require 'rspec/core/rake_task'
@@ -95,3 +94,102 @@ desc 'Install the gem locally'
95
94
  task :install do
96
95
  sh "gem install pkg/dockedit-#{DockEdit::VERSION}.gem"
97
96
  end
97
+
98
+ # Override the release task from bundler/gem_tasks
99
+ # This version only bumps version, commits, tags, and pushes to GitHub
100
+ # The GitHub workflow handles building and pushing to RubyGems
101
+ desc 'Bump version, commit changes, tag, and push to GitHub'
102
+ task :release, [:level] do |_t, args|
103
+ level = (args[:level] || 'patch').to_sym
104
+ version_file = 'lib/dockedit/version.rb'
105
+
106
+ # Validate level
107
+ raise "Invalid version level: #{level}. Use major, minor, or patch" unless %i[major minor patch].include?(level)
108
+
109
+ # Get current version
110
+ current_version = DockEdit::VERSION
111
+ parts = current_version.split('.').map(&:to_i)
112
+
113
+ # Calculate new version
114
+ case level
115
+ when :major
116
+ parts[0] += 1
117
+ parts[1] = 0
118
+ parts[2] = 0
119
+ when :minor
120
+ parts[1] += 1
121
+ parts[2] = 0
122
+ when :patch
123
+ parts[2] += 1
124
+ end
125
+
126
+ new_version = parts.join('.')
127
+
128
+ # Bump version in file
129
+ content = File.read(version_file)
130
+ content.gsub!(/VERSION = ['"][\d.]+['"]/, "VERSION = '#{new_version}'")
131
+ File.write(version_file, content)
132
+
133
+ puts "Version bumped from #{current_version} to #{new_version}"
134
+
135
+ # Update CHANGELOG.md first
136
+ puts 'Updating CHANGELOG.md...'
137
+ raise "Failed to update CHANGELOG.md with 'changelog -u'" unless system('changelog -u')
138
+
139
+ # Generate changelog commit message
140
+ puts 'Generating commit message from changelog...'
141
+
142
+ # Run changelog command to get commit message (only stdout, not stderr)
143
+ changelog_output = `changelog 2>/dev/null`
144
+ changelog_success = $?.success?
145
+
146
+ # Use changelog output, with fallback if it fails or produces no output
147
+ commit_message = if changelog_success && !changelog_output.strip.empty?
148
+ changelog_output
149
+ else
150
+ # Fallback if changelog fails or produces no output
151
+ "Bump version to #{new_version}"
152
+ end
153
+
154
+ # Save commit message to a file for use with both commit and tag
155
+ require 'tempfile'
156
+ message_file = Tempfile.new('release_msg')
157
+ message_file.write(commit_message)
158
+ message_file.close
159
+ message_path = message_file.path
160
+
161
+ begin
162
+ # Ensure we're on a clean branch (or at least warn about uncommitted changes)
163
+ status = `git status --porcelain`.strip
164
+ unless status.empty?
165
+ puts 'Warning: You have uncommitted changes:'
166
+ puts status
167
+ end
168
+
169
+ # Stage all changes (including version.rb and CHANGELOG.md)
170
+ sh 'git add -A'
171
+
172
+ # Commit with changelog message using the saved file
173
+ sh "git commit -F #{message_path}"
174
+
175
+ raise 'Failed to commit changes' unless $?.success?
176
+
177
+ puts 'Committed changes with message:'
178
+ puts commit_message.split("\n").first
179
+
180
+ # Create tag with the same message
181
+ tag_name = "v#{new_version}"
182
+ sh "git tag -a #{tag_name} -F #{message_path}"
183
+ ensure
184
+ # Clean up the temp file
185
+ message_file.unlink
186
+ end
187
+
188
+ # Push to GitHub
189
+ puts 'Pushing to GitHub...'
190
+ sh 'git push'
191
+ sh 'git push --tags'
192
+
193
+ puts "\nRelease #{tag_name} pushed to GitHub!"
194
+ puts 'GitHub Actions will build the gem and publish to RubyGems automatically.'
195
+ end
@@ -2,6 +2,6 @@
2
2
 
3
3
  module DockEdit
4
4
  # Current dockedit gem version.
5
- VERSION = '1.0.0'
5
+ VERSION = '1.0.7'
6
6
  end
7
7
 
metadata CHANGED
@@ -1,13 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: dockedit
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.0
4
+ version: 1.0.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - Brett Terpstra
8
+ autorequire:
8
9
  bindir: bin
9
10
  cert_chain: []
10
- date: 1980-01-02 00:00:00.000000000 Z
11
+ date: 2025-12-17 00:00:00.000000000 Z
11
12
  dependencies:
12
13
  - !ruby/object:Gem::Dependency
13
14
  name: rexml
@@ -62,6 +63,7 @@ metadata:
62
63
  homepage_uri: https://github.com/ttscoff/dockedit
63
64
  source_code_uri: https://github.com/ttscoff/dockedit
64
65
  changelog_uri: https://github.com/ttscoff/dockedit/blob/main/CHANGELOG.md
66
+ post_install_message:
65
67
  rdoc_options: []
66
68
  require_paths:
67
69
  - lib
@@ -76,7 +78,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
76
78
  - !ruby/object:Gem::Version
77
79
  version: '0'
78
80
  requirements: []
79
- rubygems_version: 3.6.7
81
+ rubygems_version: 3.4.19
82
+ signing_key:
80
83
  specification_version: 4
81
84
  summary: A command-line tool to edit the macOS Dock
82
85
  test_files: []