Skip to content

Commit cbee0fb

Browse files
fix(deploy): sync mathy/mathy_alpha_sm versions
- update model.config.json during python package updates
1 parent 9c097ec commit cbee0fb

File tree

2 files changed

+16
-0
lines changed

2 files changed

+16
-0
lines changed

package.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,8 @@
8484
"@semantic-release/git",
8585
{
8686
"assets": [
87+
"libraries/mathy_alpha_sm/model.config.json",
88+
"libraries/mathy_alpha_sm/mathy_alpha_sm/model.config.json",
8789
"libraries/website/docs/changelog.md",
8890
"libraries/mathy_python/mathy/about.py",
8991
"package.json"

tools/set-build-version.ts

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,20 @@ function getBuildVersion() {
3131
getBuildVersion()
3232
.then((version: any) => {
3333
console.log("--- UPDATING build version in python modules to : " + version)
34+
35+
const modelFiles = [
36+
"../libraries/mathy_alpha_sm/mathy_alpha_sm/model.config.json",
37+
"../libraries/mathy_alpha_sm/model.config.json"
38+
]
39+
40+
modelFiles.forEach((modelName: string) => {
41+
const modelPath = path.join(__dirname, modelName)
42+
const json = require(modelPath)
43+
json.version = version
44+
const fs = require("fs")
45+
fs.writeFileSync(modelPath, JSON.stringify(json, null, 2), "utf8")
46+
})
47+
3448
const filePath = path.join(
3549
__dirname,
3650
"../libraries/mathy_python/mathy/about.py"

0 commit comments

Comments
 (0)