Attempt to add postcommit

This commit is contained in:
Nicholas Zuber 2020-01-20 16:57:37 -05:00
parent 14144a5a44
commit 3c1295eb01
2 changed files with 3 additions and 2 deletions

View File

@ -2,7 +2,7 @@
const path = require('path');
const webpack = require('webpack');
const {execSync} = require('child_process');
const {readFileSync} = require('fs');
const PnpWebpackPlugin = require('pnp-webpack-plugin');
const HtmlWebpackPlugin = require('html-webpack-plugin');
const InlineChunkHtmlPlugin = require('react-dev-utils/InlineChunkHtmlPlugin');
@ -19,7 +19,7 @@ const paths = require('./paths');
const getClientEnvironment = require('./env');
const ModuleNotFoundPlugin = require('react-dev-utils/ModuleNotFoundPlugin');
const gitHash = execSync('git rev-parse --short HEAD').toString().trim();
const gitHash = readFileSync('./git-hash.txt').toString().trim();
// Webpack uses `publicPath` to determine where the app is being served from.
// It requires a trailing slash, or the file assets will get an incorrect path.

View File

@ -79,6 +79,7 @@
"build": "node scripts/build.js && cp build/index.html build/200.html",
"now-build": "npm run build",
"test": "node scripts/test.js",
"postcommit": "git rev-parse --short HEAD > git-hash.txt",
"deploy": "now --prod"
},
"eslintConfig": {