mirror of
https://github.com/aykhans/slash-e.git
synced 2026-09-23 14:26:49 +00:00
chore: update build script
This commit is contained in:
@@ -1,6 +1,3 @@
|
|||||||
# Air (hot reload) generated
|
|
||||||
.air
|
|
||||||
|
|
||||||
# temp folder
|
# temp folder
|
||||||
tmp
|
tmp
|
||||||
|
|
||||||
|
|||||||
@@ -1,15 +0,0 @@
|
|||||||
root = "."
|
|
||||||
tmp_dir = ".air"
|
|
||||||
|
|
||||||
[build]
|
|
||||||
bin = "./.air/slash.exe --mode dev"
|
|
||||||
cmd = "go build -o ./.air/slash.exe ./bin/slash/main.go"
|
|
||||||
delay = 1000
|
|
||||||
exclude_dir = [".air", "frontend", "build"]
|
|
||||||
exclude_file = []
|
|
||||||
exclude_regex = []
|
|
||||||
exclude_unchanged = false
|
|
||||||
follow_symlink = false
|
|
||||||
full_bin = ""
|
|
||||||
send_interrupt = true
|
|
||||||
kill_delay = 2000
|
|
||||||
@@ -1,15 +0,0 @@
|
|||||||
root = "."
|
|
||||||
tmp_dir = ".air"
|
|
||||||
|
|
||||||
[build]
|
|
||||||
bin = "./.air/slash --mode dev"
|
|
||||||
cmd = "go build -o ./.air/slash ./bin/slash/main.go"
|
|
||||||
delay = 1000
|
|
||||||
exclude_dir = [".air", "frontend", "build"]
|
|
||||||
exclude_file = []
|
|
||||||
exclude_regex = []
|
|
||||||
exclude_unchanged = false
|
|
||||||
follow_symlink = false
|
|
||||||
full_bin = ""
|
|
||||||
send_interrupt = true
|
|
||||||
kill_delay = 2000
|
|
||||||
@@ -0,0 +1,29 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
# Exit when any command fails
|
||||||
|
set -e
|
||||||
|
|
||||||
|
# Get the script directory and change to the project root
|
||||||
|
cd "$(dirname "$0")/../"
|
||||||
|
|
||||||
|
# Detect the operating system
|
||||||
|
OS=$(uname -s)
|
||||||
|
|
||||||
|
# Set output file name based on the OS
|
||||||
|
if [[ "$OS" == *"CYGWIN"* || "$OS" == *"MINGW"* || "$OS" == *"MSYS"* ]]; then
|
||||||
|
OUTPUT="./build/slash.exe"
|
||||||
|
else
|
||||||
|
OUTPUT="./build/slash"
|
||||||
|
fi
|
||||||
|
|
||||||
|
echo "Building for $OS..."
|
||||||
|
|
||||||
|
# Build the executable
|
||||||
|
go build -o "$OUTPUT" ./bin/slash/main.go
|
||||||
|
|
||||||
|
# Output the success message
|
||||||
|
echo "Build successful!"
|
||||||
|
|
||||||
|
# Output the command to run
|
||||||
|
echo "To run the application, execute the following command:"
|
||||||
|
echo "$OUTPUT --mode dev"
|
||||||
Reference in New Issue
Block a user