improved git commit fetching

This commit is contained in:
Simon Gardling
2022-02-24 21:12:50 -05:00
parent 6f8a7c9cc2
commit ee2936dfc4
6 changed files with 27 additions and 28 deletions

View File

@@ -10,12 +10,4 @@ mkdir tmp tmp/pkg
cp -r pkg/integral_site_bg.wasm pkg/integral_site.js tmp/pkg/
cp www/index.html www/style.css tmp/
sed -i 's/\.\.\/pkg/\.\/pkg/g' tmp/index.html
git ls-files --exclude-standard --others . >/dev/null 2>&1; ec=$?
if test "$ec" = 0; then
echo some untracked files
elif test "$ec" = 1; then
commit=$(git rev-parse HEAD)
sed -i "s/let commit = ''/let commit = '${commit}'/g" tmp/index.html
fi
sed -i 's/\.\.\/pkg/\.\/pkg/g' tmp/index.html