ocean-subgraph/scripts/replaceVersion.js
2022-06-23 14:51:32 +03:00

18 lines
441 B
JavaScript

const fs = require('fs')
const packageJson = require('../package.json')
async function replaceVersion() {
let globalUtils = fs.readFileSync(
'./src/mappings/utils/globalUtils.ts',
'utf8'
)
globalUtils = globalUtils.replace(
/.*globalStats\.version.*\n/,
" globalStats.version = '" + packageJson.version + "'\n"
)
fs.writeFileSync('./src/mappings/utils/globalUtils.ts', globalUtils, 'utf8')
}
replaceVersion()