Compare commits

...

2 Commits

Author SHA1 Message Date
8792b05cca Fix footer link and tailwind source 2025-01-20 10:39:15 +01:00
9a03a9cebd Add script to build 2025-01-20 10:39:00 +01:00
2 changed files with 23 additions and 2 deletions

21
build.sh Executable file
View 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

View File

@ -4,7 +4,7 @@
<meta charset="UTF-8"> <meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0"> <meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>qv</title> <title>qv</title>
<script src="https://cdn.tailwindcss.com"></script> <script src="/static/js/tailwind.min.js"></script>
</head> </head>
<body class="bg-gray-100 text-gray-900"> <body class="bg-gray-100 text-gray-900">
<div class="min-h-screen flex flex-col items-center justify-center"> <div class="min-h-screen flex flex-col items-center justify-center">
@ -21,7 +21,7 @@
</main> </main>
<footer class="mt-12 text-center text-gray-600"> <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> </footer>
</div> </div>
</body> </body>