mirror of
https://github.com/wavetermdev/waveterm.git
synced 2024-12-21 16:38:23 +01:00
Fix copyfiles for docsite (#1321)
This commit is contained in:
parent
7734d5dd30
commit
7c6fa91016
32
.github/workflows/build-helper.yml
vendored
32
.github/workflows/build-helper.yml
vendored
@ -12,33 +12,8 @@ on:
|
||||
env:
|
||||
GO_VERSION: "1.22"
|
||||
NODE_VERSION: 22
|
||||
STATIC_DOCSITE_PATH: docsite
|
||||
jobs:
|
||||
build-docsite:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: ${{env.NODE_VERSION}}
|
||||
- name: Install Yarn
|
||||
run: |
|
||||
corepack enable
|
||||
yarn install
|
||||
- name: Install Task
|
||||
uses: arduino/setup-task@v2
|
||||
with:
|
||||
version: 3.x
|
||||
repo-token: ${{ secrets.GITHUB_TOKEN }}
|
||||
- name: Build embedded docsite
|
||||
run: task docsite:build:embedded
|
||||
- name: Upload Build Artifact
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: docsite
|
||||
path: docsite
|
||||
build-app:
|
||||
needs: build-docsite
|
||||
outputs:
|
||||
version: ${{ steps.set-version.outputs.WAVETERM_VERSION }}
|
||||
strategy:
|
||||
@ -131,19 +106,12 @@ jobs:
|
||||
smctl windows certsync
|
||||
shell: cmd
|
||||
|
||||
- name: Download embedded docsite
|
||||
uses: actions/download-artifact@v4
|
||||
with:
|
||||
name: docsite
|
||||
path: ${{env.STATIC_DOCSITE_PATH}}
|
||||
|
||||
# Build and upload packages
|
||||
- name: Build (Linux)
|
||||
if: matrix.platform == 'linux'
|
||||
run: task package
|
||||
env:
|
||||
USE_SYSTEM_FPM: true # Ensure that the installed version of FPM is used rather than the bundled one.
|
||||
STATIC_DOCSITE_PATH: ${{env.STATIC_DOCSITE_PATH}}
|
||||
SNAPCRAFT_BUILD_ENVIRONMENT: host
|
||||
- name: Build (Darwin)
|
||||
if: matrix.platform == 'darwin'
|
||||
|
@ -77,17 +77,17 @@ tasks:
|
||||
- storybook:build
|
||||
|
||||
docsite:build:embedded:
|
||||
desc: Build the embedded docsite and copy it to ./docsite
|
||||
desc: Build the embedded docsite and copy it to dist/docsite
|
||||
sources:
|
||||
- "docs/*"
|
||||
- "docs/src/**/*"
|
||||
- "docs/docs/**/*"
|
||||
- "docs/static/**/*"
|
||||
generates:
|
||||
- "docsite/**/*"
|
||||
- "dist/docsite/**/*"
|
||||
cmds:
|
||||
- cd docs && yarn build-embedded
|
||||
- task: copyfiles:'docs/build':'../docsite'
|
||||
- task: copyfiles:'docs/build':'dist/docsite'
|
||||
deps:
|
||||
- yarn
|
||||
|
||||
@ -99,6 +99,7 @@ tasks:
|
||||
- yarn build:prod && yarn electron-builder -c electron-builder.config.cjs -p never
|
||||
deps:
|
||||
- yarn
|
||||
- docsite:build:embedded
|
||||
- build:backend
|
||||
|
||||
build:backend:
|
||||
@ -350,4 +351,4 @@ tasks:
|
||||
copyfiles:*:*:
|
||||
desc: Recursively copy directory and its contents.
|
||||
internal: true
|
||||
cmd: '{{if eq OS "windows"}}powershell Copy-Item -Recurse -Force -Path {{index .MATCH 0}} -Destination {{index .MATCH 1}}{{else}}cp -r {{index .MATCH 0}} {{index .MATCH 1}}{{end}}'
|
||||
cmd: '{{if eq OS "windows"}}powershell Copy-Item -Recurse -Force -Path {{index .MATCH 0}} -Destination {{index .MATCH 1}}{{else}}mkdir -p "$(dirname {{index .MATCH 1}})" && cp -r {{index .MATCH 0}} {{index .MATCH 1}}{{end}}'
|
||||
|
@ -109,14 +109,6 @@ const config = {
|
||||
provider: "generic",
|
||||
url: "https://dl.waveterm.dev/releases-w2",
|
||||
},
|
||||
beforePack: () => {
|
||||
const staticSourcePath = process.env.STATIC_DOCSITE_PATH;
|
||||
const staticDestPath = "dist/docsite";
|
||||
if (staticSourcePath) {
|
||||
console.log(`Static docsite path is specified, copying from "${staticSourcePath}" to "${staticDestPath}"`);
|
||||
fs.cpSync(staticSourcePath, staticDestPath, { recursive: true });
|
||||
}
|
||||
},
|
||||
afterPack: (context) => {
|
||||
// This is a workaround to restore file permissions to the wavesrv binaries on macOS after packaging the universal binary.
|
||||
if (context.electronPlatformName === "darwin" && context.arch === Arch.universal) {
|
||||
|
@ -3,14 +3,13 @@
|
||||
|
||||
import { atoms } from "@/store/global";
|
||||
import { FloatingPortal, useFloating, useInteractions } from "@floating-ui/react";
|
||||
import clsx from "clsx";
|
||||
import { useAtomValue } from "jotai";
|
||||
import { useEffect, useState } from "react";
|
||||
import "./notificationbubbles.less";
|
||||
import { NotificationItem } from "./notificationitem";
|
||||
import { useNotification } from "./usenotification";
|
||||
|
||||
import clsx from "clsx";
|
||||
import "./notificationBubbles.less";
|
||||
|
||||
const NotificationBubbles = () => {
|
||||
const {
|
||||
notifications,
|
||||
|
Loading…
Reference in New Issue
Block a user