ntopng/create_dist.sh
GabrieleDeri 6801ec1034
Added ai stats page, updated breakdown, 3x speedup dist, removed deps on npm (#10236)
* Added ai stats page, updated breakdown style, 3x speedup npm run build, removed deps on npm

* Added ai stats page href

* Fixes ai stats page

* Update dist

* Fixes create_dist
2026-03-31 18:14:06 +02:00

26 lines
536 B
Bash
Executable file

#!/bin/bash
CURR_DIR=$(pwd)
branch_name=$(git branch --show-current)
echo "Dist Branch: $branch_name"
echo "-- Cleaning up dist --"
cd httpdocs/dist
git fetch
git checkout -B "$branch_name" "origin/$branch_name"
echo "-- Compiling dist --"
cd "$CURR_DIR"
npm run build || exit 1
echo "-- Pushing dist --"
cd httpdocs/dist
git add -A
git commit -m 'Update dist' || exit 1
git push origin "$branch_name" || exit 1
echo "-- Pushing ref --"
cd "$CURR_DIR"
git add httpdocs/dist
git commit -m 'Update dist' || exit 1
git push || exit 1