mirror of
https://github.com/oceanprotocol/market.git
synced 2024-12-02 05:57:29 +01:00
24 lines
627 B
JavaScript
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,
|
||
|
' '
|
||
|
)
|
||
|
)
|