-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into slx-autocomplete
- Loading branch information
Showing
9 changed files
with
220 additions
and
81 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,21 @@ | ||
echo "\n--- Bun Install" | ||
bun i | ||
#!/bin/bash | ||
|
||
echo "\n--- Build Components" | ||
bun run build:components | ||
run() { | ||
echo -e "\n--- $1" | ||
$2 | ||
if [ $? -ne 0 ]; then | ||
echo "$1 failed." | ||
exit 1 | ||
fi | ||
} | ||
|
||
echo "\n--- Build TypeScript" | ||
bun run build:ts | ||
|
||
echo "\n--- Build CSS" | ||
bun run build:css | ||
|
||
echo "\n--- Generate Templ Templates" | ||
templ generate | ||
run "Bun Install"\ | ||
"bun i" | ||
run "Build Components"\ | ||
"bun run build:components" | ||
run "Build TypeScript"\ | ||
"bun run build:ts" | ||
run "Build CSS"\ | ||
"bun run build:css" | ||
run "Generate Templ Templates"\ | ||
"templ generate" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
#!/bin/sh | ||
|
||
# This helper script runs the server in production mode. | ||
|
||
if ! grep -q "^127\.0\.0\.1[[:space:]]\+islands\.demo" /etc/hosts; then | ||
echo 'Please add "127.0.0.1 islands.demo" to your hosts file (usually /etc/hosts)' | ||
exit 1 | ||
fi | ||
|
||
./buildall.sh | ||
if [ $? -ne 0 ]; then | ||
echo "building generated files failed" | ||
exit 1 | ||
fi | ||
|
||
mkcert -install | ||
mkcert islands.demo | ||
|
||
# Create a temporary executable file | ||
TEMP_BIN=$(mktemp) | ||
|
||
# Compile the server | ||
go build -o "$TEMP_BIN" ./cmd/server | ||
if [ $? -ne 0 ]; then | ||
echo "Compilation failed." | ||
exit 1 | ||
fi | ||
|
||
# Run the server | ||
sudo TLS_CERT="islands.demo.pem" TLS_KEY="islands.demo-key.pem" \ | ||
$TEMP_BIN -compress -host islands.demo:443 | ||
RUN_EXIT_CODE=$? | ||
|
||
# Clean up the temp executable | ||
rm -f "$TEMP_BIN" | ||
|
||
# Exit with the same status code as the server | ||
exit $RUN_EXIT_CODE |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Oops, something went wrong.