Skip to content

Commit 2b77d4e

Browse files
committed
format json
1 parent d03b6c5 commit 2b77d4e

File tree

4 files changed

+24
-5
lines changed

4 files changed

+24
-5
lines changed
Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,11 @@
11
{
2-
"versions": ["2.1.0", "2.2.5", "2.4.13", "2.5.15", "2.6.15", "2.7.0", "2.7.18"]
2+
"versions": [
3+
"2.1.0",
4+
"2.2.5",
5+
"2.4.13",
6+
"2.5.15",
7+
"2.6.15",
8+
"2.7.0",
9+
"2.7.18"
10+
]
311
}
Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
11
{
2-
"versions": ["3.0.0", "3.2.10", "3.3.5", "3.4.5", "3.5.6"]
2+
"versions": [
3+
"3.0.0",
4+
"3.2.10",
5+
"3.3.5",
6+
"3.4.5",
7+
"3.5.6"
8+
]
39
}
Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
11
{
2-
"versions": ["4.0.0-M1", "4.0.0-M2", "4.0.0-M3"]
2+
"versions": [
3+
"4.0.0-M1",
4+
"4.0.0-M2",
5+
"4.0.0-M3"
6+
]
37
}

.github/workflows/update-spring-boot-versions.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -241,10 +241,11 @@ jobs:
241241
def update_json_file(json_file, new_versions):
242242
"""Update the JSON data file with new versions"""
243243
try:
244-
# Write new versions to JSON file
244+
# Write new versions to JSON file with consistent formatting
245245
data = {"versions": new_versions}
246246
with open(json_file, 'w') as f:
247-
json.dump(data, f, indent=2)
247+
json.dump(data, f, indent=2, separators=(',', ': '))
248+
f.write('\n') # Add trailing newline
248249
return True
249250
except Exception as e:
250251
print(f"Error writing to {json_file}: {e}")

0 commit comments

Comments
 (0)