mirror of
https://github.com/oceanprotocol/ocean.js.git
synced 2024-11-26 20:39:05 +01:00
fix metadata
This commit is contained in:
parent
71c0d20c07
commit
fdd067f854
@ -8,6 +8,7 @@
|
||||
"scripts": {
|
||||
"build": "npm run clean && npm run build:tsc && npm run build:dist",
|
||||
"build:tsc": "tsc --sourceMap",
|
||||
"build:metadata": "./scripts/get-metadata.js > src/metadata.json",
|
||||
"build:dist": "cross-env NODE_ENV=production webpack",
|
||||
"clean": "rm -rf ./dist/ ./doc/ ./.nyc_output",
|
||||
"lint": "eslint --ignore-path .gitignore --ext .ts,.tsx .",
|
||||
|
19
scripts/get-metadata.js
Executable file
19
scripts/get-metadata.js
Executable file
@ -0,0 +1,19 @@
|
||||
#!/usr/bin/env node
|
||||
'use strict'
|
||||
|
||||
const packageInfo = require('../package.json')
|
||||
|
||||
const execSync = require('child_process').execSync
|
||||
|
||||
process.stdout.write(
|
||||
JSON.stringify(
|
||||
{
|
||||
version: require('../package.json').version,
|
||||
commit: execSync(`git rev-parse HEAD`)
|
||||
.toString()
|
||||
.trim()
|
||||
},
|
||||
null,
|
||||
' '
|
||||
)
|
||||
)
|
Loading…
x
Reference in New Issue
Block a user