Skip to content

Commit

Permalink
feat: adds a quick start powershell script
Browse files Browse the repository at this point in the history
  • Loading branch information
yozachar committed Apr 18, 2024
1 parent 7133260 commit 419e628
Show file tree
Hide file tree
Showing 2 changed files with 41 additions and 4 deletions.
37 changes: 37 additions & 0 deletions run.ps1
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
# # check if a command exists
# function command_exists {
# param([string]$cmd)
# if (Get-Command $cmd -ErrorAction SilentlyContinue) {
# return $true
# }
# else {
# return $false
# }
# }

# cleanup
Remove-Item -Path ./build/ -Recurse -Force

# build
Write-Host "==> Build & Generate"
pnpm install; cargo run; pnpm build

# preview
pnpm preview

# # deploy
# $commands = @("docker", "podman")
# foreach ($cmd in $commands) {
# if (command_exists $cmd) {
# Write-Host "`n==> Deploy with '$cmd'`n"
# & "$cmd-compose" -p hymnal -f ./compose.yaml down
# & "$cmd-compose" -p hymnal -f ./compose.yaml up -d
# Write-Host "`n==> Open http://[::1]:8080 in your browser"
# exit
# }
# else {
# Write-Host "`n==> Warning: Command '$cmd' not found"
# }
# }
# Write-Host "`n==> Error: Deploymnet failed"
# exit 1
8 changes: 4 additions & 4 deletions run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@ YELLOW='\033[0;33m'
BLUE='\033[0;34m'
RESET='\033[0m'

# check if a command exists
command_exists() {
command -v "$1" >/dev/null 2>&1
}
# # check if a command exists
# command_exists() {
# command -v "$1" >/dev/null 2>&1
# }

# cleanup
rm -rf ./build/
Expand Down

0 comments on commit 419e628

Please sign in to comment.