Skip to content

Instantly share code, notes, and snippets.

@LironHazan
Created November 5, 2018 10:02
Show Gist options
  • Save LironHazan/48f14c7f8caa6737622b3c9a2e58a409 to your computer and use it in GitHub Desktop.
Save LironHazan/48f14c7f8caa6737622b3c9a2e58a409 to your computer and use it in GitHub Desktop.
used for grabbing the commit hash etc..
const { gitDescribeSync } = require('git-describe');
const { writeFileSync } = require('fs');
const path = require('path');
const info = gitDescribeSync();
const infoJson = JSON.stringify(info, null, 2);
writeFileSync(path.join(__dirname, '/src/git-version.json'), infoJson);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment