13 lines
287 B
Bash
Executable File
13 lines
287 B
Bash
Executable File
#!/bin/sh
|
|
|
|
if [ -f "./dist/index.html" ]; then
|
|
GIT_COMMIT_HASH=$(git rev-parse --short HEAD)
|
|
|
|
echo -n "Update git commit hash in 'index.html' "
|
|
sed -i -- "s/{GIT_COMMIT_HASH}/$GIT_COMMIT_HASH/g" ./dist/index.html
|
|
echo " Complete!"
|
|
else
|
|
echo "Run 'npm run build'"
|
|
fi
|
|
|