Skip to content

Commit c4d785e

Browse files
authored
Merge pull request #30 from manhinhang/fix/futu-opend-ver-format
Refactor version keys in opend_version.json and update related scripts
2 parents a26cf08 + f0633f4 commit c4d785e

File tree

3 files changed

+6
-5
lines changed

3 files changed

+6
-5
lines changed

.github/workflows/publish.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,14 +25,14 @@ jobs:
2525
with:
2626
script: |
2727
const config = require('./opend_version.json');
28-
return config.beta_version;
28+
return config.betaVersion;
2929
result-encoding: string
3030
- uses: actions/github-script@v7
3131
id: stable_version
3232
with:
3333
script: |
3434
const config = require('./opend_version.json');
35-
return config.stable_version;
35+
return config.stableVersion;
3636
result-encoding: string
3737
- id: set-matrix
3838
uses: actions/github-script@v7

opend_version.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
{
2-
"beta_version": null,
3-
"stable_version": "9.3.5308"
2+
"betaVersion": null,
3+
"stableVersion": "9.3.5308"
44
}

script/check_version.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,8 @@ async function main () {
4646
console.log(data)
4747

4848
const outputFilePath = path.join(__dirname, '..', 'opend_version.json')
49-
fs.writeFileSync(outputFilePath, JSON.stringify(data, null, 2), 'utf8')
49+
const jsonString = JSON.stringify(data, null, 2) + '\n'
50+
fs.writeFileSync(outputFilePath, jsonString, 'utf8')
5051
console.log(`Version data written to ${outputFilePath}`)
5152
}
5253

0 commit comments

Comments
 (0)