mirror of
https://github.com/actualbudget/actual.git
synced 2026-03-09 06:03:01 -05:00
* New hash every build * Add release notes for PR #5928 * trigger actions * Changed from TS to MTS * [autofix.ci] apply automated fixes * [autofix.ci] apply automated fixes (attempt 2/3) --------- Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
28 lines
724 B
Bash
Executable File
28 lines
724 B
Bash
Executable File
#!/bin/bash -e
|
|
|
|
cd `dirname "$0"`
|
|
ROOT=`pwd -P`
|
|
VITE_ARGS=""
|
|
|
|
DESKTOP_DIR="$ROOT"/../../desktop-client
|
|
SERVICE_WORKER_DIR="$DESKTOP_DIR"/service-worker
|
|
|
|
# Clean out previous build files
|
|
rm -f ../dist/*
|
|
rm -rf "$DESKTOP_DIR"/service-worker
|
|
|
|
if [ $NODE_ENV == 'development' ]; then
|
|
if [ "$OSTYPE" == "msys" ]; then
|
|
# Ensure symlinks are created as native Windows symlinks.
|
|
export MSYS=winsymlinks:nativestrict
|
|
fi
|
|
ln -snf "$ROOT"/../dist/ "$DESKTOP_DIR"/service-worker
|
|
fi
|
|
|
|
yarn vite build --config ../vite.config.mts --mode $NODE_ENV $VITE_ARGS
|
|
|
|
if [ $NODE_ENV == 'production' ]; then
|
|
# In production, just copy the built files
|
|
mkdir -p "$SERVICE_WORKER_DIR"
|
|
cp -r ../dist/* "$DESKTOP_DIR"/service-worker
|
|
fi |