metanorma-plugin-plantuml 1.0.2 → 1.0.4
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/.github/workflows/plantuml-version-sync.yml +52 -70
- data/.github/workflows/rake.yml +4 -1
- data/Gemfile +1 -0
- data/README.adoc +561 -101
- data/Rakefile +236 -1
- data/lib/metanorma/plugin/plantuml/block_processor.rb +2 -3
- data/lib/metanorma/plugin/plantuml/image_block_macro_processor.rb +1 -1
- data/lib/metanorma/plugin/plantuml/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 93f98be4977dfd92a2a7b7d33a74d1f27bb9f93eb5a55116da04f64650c0a126
|
4
|
+
data.tar.gz: cfd9bf9c6d5f3e781047481784fcd7350a69ff87a86148cf41a60edf1ef16cdf
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3a9cbefb6348ff7aacee1c9a2dae7ce0373bd1e015b2b0de184674f9440740e4f04b3a3cf50e7ebf4814b98c10ef0cf91df160974166e6ea04ddf730f8a79888
|
7
|
+
data.tar.gz: fdf26284b53c231dcb4cdafed24c400c18d7c323ad7f4c4506219cfa89395d818072d93c67a8714500ce906b426b583a1b4c2c8579dd6ed5f595c6b52753a1fa
|
@@ -8,7 +8,7 @@ on:
|
|
8
8
|
# Allow manual triggering
|
9
9
|
|
10
10
|
jobs:
|
11
|
-
|
11
|
+
update-plantuml:
|
12
12
|
runs-on: ubuntu-latest
|
13
13
|
|
14
14
|
steps:
|
@@ -23,91 +23,73 @@ jobs:
|
|
23
23
|
ruby-version: '3.1'
|
24
24
|
bundler-cache: true
|
25
25
|
|
26
|
-
- name:
|
27
|
-
id:
|
26
|
+
- name: Check for PlantUML updates
|
27
|
+
id: update
|
28
28
|
run: |
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
id: latest-version
|
34
|
-
run: |
|
35
|
-
LATEST_VERSION=$(curl -s https://api.github.com/repos/plantuml/plantuml/releases/latest | jq -r .tag_name | sed 's/^v//')
|
36
|
-
echo "version=$LATEST_VERSION" >> $GITHUB_OUTPUT
|
37
|
-
|
38
|
-
- name: Compare versions
|
39
|
-
id: compare
|
40
|
-
run: |
|
41
|
-
if [ "${{ steps.current-version.outputs.version }}" != "${{ steps.latest-version.outputs.version }}" ]; then
|
42
|
-
echo "needs_update=true" >> $GITHUB_OUTPUT
|
43
|
-
echo "Current version: ${{ steps.current-version.outputs.version }}"
|
44
|
-
echo "Latest version: ${{ steps.latest-version.outputs.version }}"
|
29
|
+
# Run the update task and capture exit code
|
30
|
+
if rake update_plantuml; then
|
31
|
+
echo "update_made=false" >> $GITHUB_OUTPUT
|
32
|
+
echo "No update needed - PlantUML is up to date"
|
45
33
|
else
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
- name: Update version file
|
51
|
-
if: steps.compare.outputs.needs_update == 'true'
|
52
|
-
run: |
|
53
|
-
NEW_VERSION="${{ steps.latest-version.outputs.version }}"
|
54
|
-
sed -i "s/PLANTUML_JAR_VERSION = \".*\"/PLANTUML_JAR_VERSION = \"$NEW_VERSION\"/" lib/metanorma/plugin/plantuml/version.rb
|
34
|
+
EXIT_CODE=$?
|
35
|
+
if [ $EXIT_CODE -eq 1 ]; then
|
36
|
+
echo "update_made=true" >> $GITHUB_OUTPUT
|
37
|
+
echo "Update completed successfully"
|
55
38
|
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
# Increment patch version using semantic versioning
|
60
|
-
CURRENT_GEM_VERSION=$(ruby -e "require './lib/metanorma/plugin/plantuml/version'; puts Metanorma::Plugin::Plantuml::VERSION")
|
61
|
-
NEW_GEM_VERSION=$(ruby -e "
|
62
|
-
require 'rubygems'
|
63
|
-
current_version = Gem::Version.new('$CURRENT_GEM_VERSION')
|
64
|
-
segments = current_version.segments
|
65
|
-
segments[2] = (segments[2] || 0) + 1
|
66
|
-
puts segments.join('.')
|
67
|
-
")
|
68
|
-
sed -i "s/VERSION = \".*\"/VERSION = \"$NEW_GEM_VERSION\"/" lib/metanorma/plugin/plantuml/version.rb
|
69
|
-
echo "Updated gem version from $CURRENT_GEM_VERSION to $NEW_GEM_VERSION"
|
39
|
+
# Get version info for PR
|
40
|
+
PLANTUML_VERSION=$(ruby -e "load 'lib/metanorma/plugin/plantuml/version.rb'; puts Metanorma::Plugin::Plantuml::PLANTUML_JAR_VERSION")
|
41
|
+
GEM_VERSION=$(ruby -e "load 'lib/metanorma/plugin/plantuml/version.rb'; puts Metanorma::Plugin::Plantuml::VERSION")
|
70
42
|
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
- name: Verify new JAR works
|
78
|
-
if: steps.compare.outputs.needs_update == 'true'
|
79
|
-
run: |
|
80
|
-
if [ -f "data/plantuml.jar" ]; then
|
81
|
-
echo "PlantUML JAR downloaded successfully"
|
82
|
-
java -jar data/plantuml.jar -version || echo "Version check completed"
|
83
|
-
else
|
84
|
-
echo "Failed to download PlantUML JAR"
|
85
|
-
exit 1
|
43
|
+
echo "plantuml_version=$PLANTUML_VERSION" >> $GITHUB_OUTPUT
|
44
|
+
echo "gem_version=$GEM_VERSION" >> $GITHUB_OUTPUT
|
45
|
+
else
|
46
|
+
echo "❌ Update failed with exit code $EXIT_CODE"
|
47
|
+
exit $EXIT_CODE
|
48
|
+
fi
|
86
49
|
fi
|
50
|
+
env:
|
51
|
+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
87
52
|
|
88
53
|
- name: Create Pull Request
|
89
|
-
if: steps.
|
54
|
+
if: steps.update.outputs.update_made == 'true'
|
90
55
|
uses: peter-evans/create-pull-request@v5
|
91
56
|
with:
|
92
57
|
token: ${{ secrets.GITHUB_TOKEN }}
|
93
58
|
commit-message: |
|
94
|
-
Update PlantUML to version ${{ steps.
|
59
|
+
Update PlantUML to version ${{ steps.update.outputs.plantuml_version }}
|
95
60
|
|
96
|
-
- Updated PLANTUML_JAR_VERSION to ${{ steps.
|
97
|
-
- Downloaded new PlantUML JAR file
|
98
|
-
- Incremented gem version
|
99
|
-
|
61
|
+
- Updated PLANTUML_JAR_VERSION to ${{ steps.update.outputs.plantuml_version }}
|
62
|
+
- Downloaded and verified new PlantUML JAR file
|
63
|
+
- Incremented gem version to ${{ steps.update.outputs.gem_version }}
|
64
|
+
|
65
|
+
Generated by automated PlantUML update workflow
|
66
|
+
title: "Update PlantUML to version ${{ steps.update.outputs.plantuml_version }}"
|
100
67
|
body: |
|
101
|
-
This PR updates PlantUML to the latest version
|
68
|
+
This PR updates PlantUML to the latest version **${{ steps.update.outputs.plantuml_version }}**.
|
69
|
+
|
70
|
+
## Changes Made
|
71
|
+
- ✅ Updated `PLANTUML_JAR_VERSION` to `${{ steps.update.outputs.plantuml_version }}`
|
72
|
+
- ✅ Downloaded and verified new PlantUML JAR file
|
73
|
+
- ✅ Incremented gem version to `${{ steps.update.outputs.gem_version }}`
|
74
|
+
- ✅ Validated JAR functionality with version check and diagram generation
|
75
|
+
|
76
|
+
## Automated Validation
|
77
|
+
- [x] Found latest valid PlantUML release (excludes pre-releases and native builds)
|
78
|
+
- [x] Confirmed semantic version is newer than current
|
79
|
+
- [x] JAR file downloads successfully
|
80
|
+
- [x] JAR executes and shows correct version
|
81
|
+
- [x] JAR can generate test diagrams
|
102
82
|
|
103
|
-
|
104
|
-
|
105
|
-
- Downloaded new PlantUML JAR to `data/plantuml.jar`
|
106
|
-
- Incremented gem version
|
83
|
+
---
|
84
|
+
*This update was created automatically by the PlantUML version sync workflow using `rake update_plantuml`.*
|
107
85
|
|
108
|
-
|
109
|
-
|
86
|
+
To update PlantUML manually, run:
|
87
|
+
```bash
|
88
|
+
rake update_plantuml
|
89
|
+
```
|
90
|
+
branch: update-plantuml-${{ steps.update.outputs.plantuml_version }}
|
110
91
|
base: main
|
111
92
|
labels: |
|
112
93
|
enhancement
|
113
94
|
automated
|
95
|
+
plantuml-update
|
data/.github/workflows/rake.yml
CHANGED
@@ -10,6 +10,9 @@ on:
|
|
10
10
|
|
11
11
|
jobs:
|
12
12
|
rake:
|
13
|
-
uses: metanorma/ci/.github/workflows/
|
13
|
+
uses: metanorma/ci/.github/workflows/generic-rake.yml@main
|
14
14
|
secrets:
|
15
15
|
pat_token: ${{ secrets.METANORMA_CI_PAT_TOKEN }}
|
16
|
+
with:
|
17
|
+
before-setup-ruby: |
|
18
|
+
java -version
|