mirror of
https://github.com/oceanprotocol/ocean-subgraph.git
synced 2024-10-31 23:35:19 +01:00
18 lines
441 B
JavaScript
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()
|