mirror of
https://github.com/oceanprotocol/market.git
synced 2024-11-15 09:44:53 +01:00
26 lines
691 B
JavaScript
26 lines
691 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 || process.env.BRANCH || 'dev',
|
|
commit:
|
|
process.env.VERCEL_GITHUB_COMMIT_SHA ||
|
|
process.env.COMMIT_REF ||
|
|
execSync(`git rev-parse HEAD`).toString().trim()
|
|
},
|
|
null,
|
|
' '
|
|
)
|
|
)
|