Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 13 additions & 8 deletions .githooks/pre-push
Original file line number Diff line number Diff line change
@@ -1,15 +1,20 @@
#! /bin/bash
#! /usr/bin/env bash

# Build the UI
cd src/ui
echo "Rebuilding the UI..."
cd "$(dirname "${BASH_SOURCE[0]}")/../src/ui"
npm run deploy

# Check for changes
git diff-index --quiet HEAD
echo "Checking for changes..."
git diff --quiet --exit-code
if [ $? -eq 1 ]; then
# Stage all changes
echo "Changes detected. Staging and appending to the last commit..."

git add -A
git commit --no-verify --quiet --message "chore: rebuild the project"

exit 1
else
echo "No changes detected."

# Commit the changes
git commit -n -q -m "chore: rebuild the project"
exit 0
fi
40 changes: 0 additions & 40 deletions .github/workflows/nightly-release.yml

This file was deleted.

4 changes: 2 additions & 2 deletions src/ui/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,14 @@
"name": "model-explorer",
"version": "0.0.0",
"scripts": {
"prepare": "git config --local core.hooksPath .githooks/",
Comment thread
madcampos marked this conversation as resolved.
"ng": "ng",
"start": "ng serve model_explorer --host 0.0.0.0",
"build": "ng build model_explorer",
"build-npm": "./scripts/build_npm.sh",
"deploy": "./scripts/build_and_update_python_package.sh",
"watch": "ng build --watch --configuration development",
"test": "ng test model_explorer",
"setup-git-hooks": "cd ../.. && git config --local core.hooksPath .githooks/"
"test": "ng test model_explorer"
},
"private": true,
"dependencies": {
Expand Down