Compare commits
2 Commits
bddae031cc
...
8792b05cca
Author | SHA1 | Date | |
---|---|---|---|
8792b05cca
|
|||
9a03a9cebd
|
21
build.sh
Executable file
21
build.sh
Executable file
@ -0,0 +1,21 @@
|
||||
#!/bin/bash
|
||||
|
||||
BINARY_NAME="qv"
|
||||
LD_FLAGS="-s -w"
|
||||
|
||||
PLATFORMS=("linux/amd64" "darwin/amd64" "windows/amd64")
|
||||
|
||||
for PLATFORM in "${PLATFORMS[@]}"; do
|
||||
GOOS=$(echo $PLATFORM | cut -d'/' -f1)
|
||||
GOARCH=$(echo $PLATFORM | cut -d'/' -f2)
|
||||
|
||||
echo "Building for $GOOS/$GOARCH..."
|
||||
|
||||
GOOS=$GOOS GOARCH=$GOARCH go build -ldflags="$LD_FLAGS" -o "$BINARY_NAME-$GOOS-$GOARCH" ./cmd/web/
|
||||
|
||||
if [ $? -eq 0 ]; then
|
||||
echo "Build successful: $BINARY_NAME-$GOOS-$GOARCH"
|
||||
else
|
||||
echo "Build failed for $GOOS/$GOARCH"
|
||||
fi
|
||||
done
|
@ -4,7 +4,7 @@
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>qv</title>
|
||||
<script src="https://cdn.tailwindcss.com"></script>
|
||||
<script src="/static/js/tailwind.min.js"></script>
|
||||
</head>
|
||||
<body class="bg-gray-100 text-gray-900">
|
||||
<div class="min-h-screen flex flex-col items-center justify-center">
|
||||
@ -21,7 +21,7 @@
|
||||
</main>
|
||||
|
||||
<footer class="mt-12 text-center text-gray-600">
|
||||
<p>See the source code<a href="https://code.dlmw.ch/dlmw/qv"></a></p>
|
||||
<a href="https://code.dlmw.ch/dlmw/qv" target="_blank">See the source code</a>
|
||||
</footer>
|
||||
</div>
|
||||
</body>
|
||||
|
Reference in New Issue
Block a user