Files
edubox/agent/build.sh
T
root 2feea2d063 fix(agent): versionnage des fichiers agent pour éviter le cache navigateur
- build.sh génère désormais des fichiers versionnés (edubox-agent-vX.Y.Z)
- dashboard et /api/download pointent vers les fichiers versionnés
- affichage de la version actuelle sur la page de téléchargement
2026-06-12 21:50:14 +00:00

27 lines
819 B
Bash
Executable File

#!/bin/bash
set -e
VERSION="0.2.3"
LDFLAGS="-X main.version=${VERSION}"
echo "Building EduBox Agent v${VERSION}..."
export PATH=$PATH:/usr/local/go/bin
GOOS=windows GOARCH=amd64 go build -ldflags "${LDFLAGS}" -o edubox-agent.exe .
echo " edubox-agent.exe (Windows amd64)"
cp edubox-agent.exe "edubox-agent-v${VERSION}.exe"
echo " edubox-agent-v${VERSION}.exe (Windows amd64)"
GOOS=linux GOARCH=amd64 go build -ldflags "${LDFLAGS}" -o edubox-agent .
echo " edubox-agent (Linux amd64)"
cp edubox-agent "edubox-agent-v${VERSION}"
echo " edubox-agent-v${VERSION} (Linux amd64)"
GOOS=darwin GOARCH=amd64 go build -ldflags "${LDFLAGS}" -o edubox-agent-mac .
echo " edubox-agent-mac (macOS amd64)"
cp edubox-agent-mac "edubox-agent-v${VERSION}-mac"
echo " edubox-agent-v${VERSION}-mac (macOS amd64)"
echo "Done."