Skip to content

Commit 926475e

Browse files
authored
fix tsunami:scaffold for windows runner (#2562)
1 parent b20f3ba commit 926475e

File tree

1 file changed

+30
-2
lines changed

1 file changed

+30
-2
lines changed

Taskfile.yml

Lines changed: 30 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -520,23 +520,51 @@ tasks:
520520

521521
tsunami:scaffold:internal:
522522
desc: Internal task to create scaffold directory structure
523+
internal: true
524+
cmds:
525+
- task: tsunami:scaffold:internal:unix
526+
- task: tsunami:scaffold:internal:windows
527+
528+
tsunami:scaffold:internal:unix:
529+
desc: Internal task to create scaffold directory structure (Unix)
523530
dir: tsunami/frontend
524531
internal: true
532+
platforms: [darwin, linux]
525533
cmds:
526534
- cmd: "{{.RMRF}} scaffold"
527535
ignore_error: true
528-
- mkdir scaffold
536+
- mkdir -p scaffold
529537
- cp ../templates/package.json.tmpl scaffold/package.json
530538
- cd scaffold && npm install
531539
- cp -r dist scaffold/
532-
- mkdir scaffold/dist/tw
540+
- mkdir -p scaffold/dist/tw
533541
- cp ../templates/app-main.go.tmpl scaffold/app-main.go
534542
- cp ../templates/tailwind.css scaffold/
535543
- cp ../templates/gitignore.tmpl scaffold/.gitignore
536544
- cp src/element/*.tsx scaffold/dist/tw/
537545
- cp ../ui/*.go scaffold/dist/tw/
538546
- cp ../engine/errcomponent.go scaffold/dist/tw/
539547

548+
tsunami:scaffold:internal:windows:
549+
desc: Internal task to create scaffold directory structure (Windows)
550+
dir: tsunami/frontend
551+
internal: true
552+
platforms: [windows]
553+
cmds:
554+
- cmd: "{{.RMRF}} scaffold"
555+
ignore_error: true
556+
- powershell New-Item -ItemType Directory -Force -Path scaffold
557+
- powershell Copy-Item -Path ../templates/package.json.tmpl -Destination scaffold/package.json
558+
- powershell -Command "Set-Location scaffold; npm install"
559+
- powershell Copy-Item -Recurse -Force -Path dist -Destination scaffold/
560+
- powershell New-Item -ItemType Directory -Force -Path scaffold/dist/tw
561+
- powershell Copy-Item -Path ../templates/app-main.go.tmpl -Destination scaffold/app-main.go
562+
- powershell Copy-Item -Path ../templates/tailwind.css -Destination scaffold/
563+
- powershell Copy-Item -Path ../templates/gitignore.tmpl -Destination scaffold/.gitignore
564+
- powershell Copy-Item -Path 'src/element/*.tsx' -Destination scaffold/dist/tw/
565+
- powershell Copy-Item -Path '../ui/*.go' -Destination scaffold/dist/tw/
566+
- powershell Copy-Item -Path ../engine/errcomponent.go -Destination scaffold/dist/tw/
567+
540568
tsunami:build:
541569
desc: Build the tsunami binary.
542570
cmds:

0 commit comments

Comments
 (0)