-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Made invite code and group optional. created build script
- Loading branch information
FrostWalk
committed
Sep 29, 2024
1 parent
02aceb9
commit 89065bb
Showing
14 changed files
with
271 additions
and
57 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 |
---|---|---|
|
@@ -5,4 +5,6 @@ Dockerfile | |
docker-compose.yml | ||
LICENSE | ||
README.md | ||
assets/ | ||
assets/ | ||
build/ | ||
build.sh |
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,2 +1,3 @@ | ||
gopath/ | ||
.idea/ | ||
.idea/ | ||
build/ |
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.
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,44 @@ | ||
#!/bin/bash | ||
|
||
# Nome del file Go che desideri compilare | ||
SOURCE_FILE="main.go" | ||
|
||
# Nome del binario risultante | ||
OUTPUT_NAME="inviter" | ||
OUTPUT_PATH="./build" | ||
|
||
# Funzione per compilare l'applicazione | ||
build() { | ||
local os=$1 | ||
local arch=$2 | ||
local output=$3 | ||
|
||
echo "Compilazione per $os/$arch..." | ||
|
||
# Impostiamo le variabili di ambiente per la compilazione | ||
GOOS=$os GOARCH=$arch CGO_ENABLED=0 go build -ldflags="-s -w" -o "$OUTPUT_PATH/$output" $SOURCE_FILE | ||
|
||
if [ $? -ne 0 ]; then | ||
echo "Errore durante la compilazione per $os/$arch" | ||
exit 1 | ||
fi | ||
|
||
echo "Compilazione completata: $output" | ||
} | ||
|
||
# Compilazione per Windows (amd64) | ||
build "windows" "amd64" "${OUTPUT_NAME}_windows_amd64.exe" | ||
|
||
# Compilazione per Linux (amd64) | ||
build "linux" "amd64" "${OUTPUT_NAME}_linux_amd64" | ||
|
||
# Compilazione per Linux (arm64) | ||
build "linux" "arm64" "${OUTPUT_NAME}_linux_arm64" | ||
|
||
# Compilazione per macOS (Intel) | ||
build "darwin" "amd64" "${OUTPUT_NAME}_macos_amd64" | ||
|
||
# Compilazione per macOS (ARM - serie M) | ||
build "darwin" "arm64" "${OUTPUT_NAME}_macos_arm64" | ||
|
||
echo "Tutte le compilazioni sono completate." |
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
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
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
Oops, something went wrong.