a2s.su/update_commit.sh

13 lines
287 B
Bash
Raw Normal View History

2023-08-04 00:45:01 +03:00
#!/bin/sh
if [ -f "./dist/index.html" ]; then
2023-08-04 00:45:01 +03:00
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
2023-08-04 00:45:01 +03:00
echo " Complete!"
else
echo "Run 'npm run build'"
fi