Skip to content

Commit ee03ef8

Browse files
authored
Setup post-commit hook to withstand template based creations
1 parent 7df2230 commit ee03ef8

2 files changed

Lines changed: 3 additions & 2 deletions

File tree

.devcontainer/postStartCommand.sh

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,5 +22,6 @@ supervisord
2222
supervisorctl reread
2323
supervisorctl update
2424

25-
# Run the build script to perform a one-time build for static preview
25+
# Set up post-commit hook and also run the build script to perform a one-time build for static preview
26+
ln -fs /usr/local/bin/post-commit .git/hooks/pre-push
2627
/usr/local/bin/static-preview-build.sh

.devcontainer/refreshTools.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ sudo cp ./spark-sdk-dist/proxy.js /workspaces/proxy.js
4545
sudo mv ./spark-sdk-dist/proxy.js /usr/local/bin/proxy.js
4646
sudo mv ./spark-sdk-dist/spark.package.json /workspaces/spark.package.json
4747
sudo mv ./spark-sdk-dist/static-preview-build.sh /usr/local/bin/static-preview-build.sh
48-
sudo mv ./spark-sdk-dist/post-commit ${WORKSPACE_DIR}/.git/hooks/post-commit
48+
sudo mv ./spark-sdk-dist/post-commit /usr/local/bin/post-commit
4949

5050
# Upgrade the Spark Tools package
5151
if [ -f "$TOOLS_MARKER_FILE" ] && [ "$(cat "$TOOLS_MARKER_FILE")" == "$(cat ./spark-sdk-dist/spark-tools-version)" ]; then

0 commit comments

Comments
 (0)