discharger 0.2.14 → 0.2.15
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/CHANGELOG.md +2 -27
- data/README.md +21 -4
- data/lib/discharger/setup_runner/commands/yarn_command.rb +21 -1
- data/lib/discharger/version.rb +1 -1
- 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: 6e92527599720c4eb9681913763e0d84c8c151b2cf93d96ec5dd5e8b6c3bc055
|
|
4
|
+
data.tar.gz: 7cc5f4c226faa5350703ba968bbe04df75aae75a087ca9cc9975bfbd30dd2eb9
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 29e053cf5b57921975d1db1f0d063480b4df0b9b663dc21500f82ba7606760bd80df41eb293fc5831a037749a5453395550b4d4c7ef60b43f40327c18a8a7abe
|
|
7
|
+
data.tar.gz: 17802e2018819e350101312d5bee195eb8dae88ce2e19b5845ebf060d10bab3a0028fcee105b6ba88677671a75f37e92bca8d769f7039a8e16615e210735e576
|
data/CHANGELOG.md
CHANGED
|
@@ -5,33 +5,8 @@ All notable changes to this project will be documented in this file.
|
|
|
5
5
|
The format is based on [Keep a Changelog](http://keepachangelog.com/)
|
|
6
6
|
and this project adheres to [Semantic Versioning](http://semver.org/).
|
|
7
7
|
|
|
8
|
-
## [0.2.
|
|
9
|
-
|
|
10
|
-
### Added
|
|
11
|
-
|
|
12
|
-
- Documentation about setup features and custom commands.
|
|
13
|
-
- Reissue deprecated fragment_directory and added fragment.
|
|
14
|
-
|
|
15
|
-
### Removed
|
|
16
|
-
|
|
17
|
-
- Got rid of the prepare release yml and action, only the Release gem to RubyGems.org is needed now.
|
|
18
|
-
- Got rid of the code climate action.
|
|
19
|
-
|
|
20
|
-
### Fixed
|
|
21
|
-
|
|
22
|
-
- Updated release documentation.
|
|
23
|
-
|
|
24
|
-
## [0.2.13] - 2025-09-02
|
|
25
|
-
|
|
26
|
-
### Added
|
|
27
|
-
|
|
28
|
-
- Added clean up fragment_directory task on Task.
|
|
29
|
-
- Added trusted publisher flow to GitHub release action.
|
|
30
|
-
- Adding commit step if needed after the finalize.
|
|
8
|
+
## [0.2.15] - 2025-10-24
|
|
31
9
|
|
|
32
10
|
### Fixed
|
|
33
11
|
|
|
34
|
-
-
|
|
35
|
-
- Added debugging for OIDC.
|
|
36
|
-
- Switching back to version 1.0.0 for trusted publisher
|
|
37
|
-
- Now going for the official RubyGems GitHub action for the gem publishing.
|
|
12
|
+
- Respect packageManager version from package.json instead of forcing yarn@stable
|
data/README.md
CHANGED
|
@@ -50,18 +50,35 @@ Discharger::Task.create do |task|
|
|
|
50
50
|
end
|
|
51
51
|
```
|
|
52
52
|
|
|
53
|
-
### Changelog
|
|
53
|
+
### Changelog Management
|
|
54
54
|
|
|
55
|
-
Discharger supports changelog
|
|
55
|
+
Discharger supports changelog management through the `fragment` setting from [Reissue](https://github.com/SOFware/reissue?tab=readme-ov-file#configuration-options).
|
|
56
|
+
|
|
57
|
+
#### Git Commit Trailers
|
|
58
|
+
|
|
59
|
+
Document changes directly in your commit messages using git trailers. Set `task.fragment = :git` to enable this feature:
|
|
60
|
+
|
|
61
|
+
```ruby
|
|
62
|
+
Discharger::Task.create do |task|
|
|
63
|
+
# ... other configuration ...
|
|
64
|
+
task.fragment = :git # Enable git commit trailers
|
|
65
|
+
end
|
|
66
|
+
```
|
|
67
|
+
|
|
68
|
+
This keeps changelog data coupled with your code changes in the same commit. See [Git Trailers Guide](docs/git-trailers-guide.md) for detailed usage instructions.
|
|
69
|
+
|
|
70
|
+
#### File-Based Fragments
|
|
71
|
+
|
|
72
|
+
Alternatively, you can use file-based fragments by creating individual changelog files in a directory:
|
|
56
73
|
|
|
57
74
|
```ruby
|
|
58
75
|
Discharger::Task.create do |task|
|
|
59
76
|
# ... other configuration ...
|
|
60
|
-
task.fragment = "changelog.d" #
|
|
77
|
+
task.fragment = "changelog.d" # Enable file-based fragments
|
|
61
78
|
end
|
|
62
79
|
```
|
|
63
80
|
|
|
64
|
-
With
|
|
81
|
+
With this approach, create individual changelog files in the `changelog.d/` directory:
|
|
65
82
|
|
|
66
83
|
```
|
|
67
84
|
changelog.d/
|
|
@@ -13,7 +13,27 @@ module Discharger
|
|
|
13
13
|
if File.exist?(File.join(app_root, "yarn.lock"))
|
|
14
14
|
if system_quiet("which corepack")
|
|
15
15
|
system! "corepack enable"
|
|
16
|
-
|
|
16
|
+
|
|
17
|
+
package_json_path = File.join(app_root, "package.json")
|
|
18
|
+
if File.exist?(package_json_path)
|
|
19
|
+
begin
|
|
20
|
+
require "json"
|
|
21
|
+
package_json = JSON.parse(File.read(package_json_path))
|
|
22
|
+
|
|
23
|
+
if package_json["packageManager"]&.start_with?("yarn@")
|
|
24
|
+
yarn_spec = package_json["packageManager"].split("+").first
|
|
25
|
+
log "Using #{yarn_spec} from package.json"
|
|
26
|
+
system! "corepack use #{yarn_spec}"
|
|
27
|
+
else
|
|
28
|
+
system! "corepack use yarn@stable"
|
|
29
|
+
end
|
|
30
|
+
rescue JSON::ParserError => e
|
|
31
|
+
log "Warning: Could not parse package.json: #{e.message}"
|
|
32
|
+
system! "corepack use yarn@stable"
|
|
33
|
+
end
|
|
34
|
+
else
|
|
35
|
+
system! "corepack use yarn@stable"
|
|
36
|
+
end
|
|
17
37
|
end
|
|
18
38
|
|
|
19
39
|
# Install dependencies
|
data/lib/discharger/version.rb
CHANGED