1
0
mirror of https://github.com/oceanprotocol/market.git synced 2024-06-28 00:27:49 +02:00
market/scripts/write-repo-metadata.js
Matthias Kretschmann b3510230e9
More footer data (#224)
* output total datatoken liquidity in footer stats

* add build id to footer

* write out repo metadata before build

* build tweaks

* add title

* refactor
2020-11-09 14:31:04 +01:00

24 lines
627 B
JavaScript

#!/usr/bin/env node
'use strict'
const execSync = require('child_process').execSync
//
// VERCEL_GITHUB_COMMIT_REF & VERCEL_GITHUB_COMMIT_SHA need to be added with empty
// values in Vercel environment variables, making them available to builds.
// https://vercel.com/docs/build-step#system-environment-variables
//
process.stdout.write(
JSON.stringify(
{
version: require('../package.json').version,
branch: process.env.VERCEL_GITHUB_COMMIT_REF || 'dev',
commit:
process.env.VERCEL_GITHUB_COMMIT_SHA ||
execSync(`git rev-parse HEAD`).toString().trim()
},
null,
' '
)
)