Skip to content
Merged
Show file tree
Hide file tree
Changes from 3 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
19 changes: 12 additions & 7 deletions .github/workflows/nightly-release.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
name: Nightly Release

on:
schedule:
- cron: "0 6 * * *"
# schedule:
Comment thread
madcampos marked this conversation as resolved.
Outdated
# - cron: "0 6 * * *"
workflow_dispatch:
inputs:
draft:
Expand All @@ -16,25 +16,30 @@ jobs:
env:
GH_TOKEN: ${{ github.token }}
steps:
- uses: actions/checkout@v4
- name: version tag
- name: Checkout code
uses: actions/checkout@v4

- name: Get version tag
id: version-tag
run: |
tag="0.0.$(date +"%Y%m%d%H%M%S")"
echo "tag=$tag" >> $GITHUB_OUTPUT

- name: Set up Python 3.11
uses: actions/setup-python@v5
with:
python-version: "3.11"

- name: Install Dependencies
run: |
python -m pip install --upgrade pip setuptools
python -m pip install wheel numpy twine
run: python -m pip install --upgrade pip setuptools wheel numpy twine

- name: Build Package
run: |
cd ./src/builtin-adapter
./python/pip_package/build_pip_package.sh ${{ steps.version-tag.outputs.tag }}

- name: Verify the Distribution
run: twine check ./src/builtin-adapter/gen/adapter_pip/dist/*

- name: Check Directory Output
run: ls -l ./src/builtin-adapter/gen/adapter_pip/dist/*.whl
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