Skip to content

Commit

Permalink
test
Browse files Browse the repository at this point in the history
  • Loading branch information
skamril committed Jan 26, 2024
1 parent b4e3fd8 commit 4f10c24
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 1 deletion.
1 change: 1 addition & 0 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ on:
branches:
- "master"
- "hotfix/**"
- "feature/test_desktop"

jobs:
binary:
Expand Down
20 changes: 20 additions & 0 deletions scripts/build-front.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,27 @@ set -e
CURR_DIR=$(cd "$(dirname "$0")" && pwd)

cd "$CURR_DIR"/../webapp

# shellcheck disable=SC2016
if [[ "$OSTYPE" == "darwin"* ]]; then
sed -i '' 's|"homepage".*|"homepage": "/static",|g' package.json
sed -i '' 's|loadPath.*|loadPath: `/static/locales/{{lng}}/{{ns}}.json?v=${version}`,|g' src/i18n.ts
else
sed -i 's|"homepage".*|"homepage": "/static",|g' package.json
sed -i 's|loadPath.*|loadPath: `/static/locales/{{lng}}/{{ns}}.json?v=${version}`,|g' src/i18n.ts
fi

npm run build

# shellcheck disable=SC2016
if [[ "$OSTYPE" == "darwin"* ]]; then
sed -i '' 's|"homepage".*|"homepage": "/",|g' package.json
sed -i '' 's|loadPath.*|loadPath: `/locales/{{lng}}/{{ns}}.json?v=${version}`,|g' src/i18n.ts
else
sed -i 's|"homepage".*|"homepage": "/",|g' package.json
sed -i 's|loadPath.*|loadPath: `/locales/{{lng}}/{{ns}}.json?v=${version}`,|g' src/i18n.ts
fi

cd ..
rm -fr resources/webapp
cp -r ./webapp/dist/ resources/webapp
Expand Down
3 changes: 2 additions & 1 deletion webapp/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,10 @@
"name": "antares-web",
"version": "2.16.3",
"private": true,
"homepage": "/",
"type": "module",
"scripts": {
"build": "tsc && vite build",
"build": "tsc && vite build --base=./",
"clean": "rm -rf dist node_modules/.vite",
"dev": "vite",
"lint": "tsc --noEmit && eslint . --ext ts,tsx --report-unused-disable-directives",
Expand Down

0 comments on commit 4f10c24

Please sign in to comment.