--- /dev/null
+#!/bin/bash
+set -euxo pipefail
+cd "$(git rev-parse --show-toplevel)"
+source buildscripts/init.sh "$1"
+
+case $PLATFORM in
+linux-x86_64|linux-armhf|linux-arm64)
+ mkdir build && cd build
+ go build ../server/
+ go build ../radio/
+ ;;
+*)
+ echo "Skipping build on ${PLATFORM}"
+ exit 0
+ ;;
+esac
--- /dev/null
+#!/bin/bash
+set -euxo pipefail
+cd "$(git rev-parse --show-toplevel)"
+
+TAG=$1
+
+BASENAME="broadcaster-${TAG}"
+FILENAME="${BASENAME}.tar.xz"
+
+git archive "${TAG}" -o "${FILENAME}" --prefix="${BASENAME}/"
+
+echo "GENERIC_ARTIFACT|${FILENAME}|Source Code"
+echo "URL|Git Tag|https://code.octet-stream.net/broadcaster/shortlog/refs/tags/${TAG}|${TAG}"
--- /dev/null
+#!/bin/bash
+set -euxo pipefail
+cd "$(git rev-parse --show-toplevel)"
+
+APP=broadcaster
+
+PLATFORM=$1
+TAG=$2
+source buildscripts/init.sh "${PLATFORM}"
+
+BASENAME="${APP}-${TAG}-${PLATFORM}"
+
+case $PLATFORM in
+linux-x86_64|linux-armhf|linux-arm64)
+ FILENAME="${BASENAME}.tar.xz"
+ TARCMD="tar -Jcf ${FILENAME} ${BASENAME}"
+ ;;
+*)
+ echo "Skipping build on ${PLATFORM}"
+ exit 0
+ ;;
+esac
+
+mkdir build && cd build
+mkdir "${BASENAME}"
+go build ../server/
+go build ../radio/
+mv server "${BASENAME}/broadcast-server"
+mv radio "${BASENAME}/broadcast-radio"
+
+${TARCMD}
+
+echo "PLATFORM_ARTIFACT|build/${FILENAME}"
--- /dev/null
+#!/bin/bash
+set -euxo pipefail
+cd "$(git rev-parse --show-toplevel)"
+
+PLATFORM=$1
+
+case $PLATFORM in
+mac-x86_64)
+ GOOS=darwin
+ GOARCH=amd64
+ ;;
+mac-arm64)
+ GOOS=darwin
+ GOARCH=arm64
+ ;;
+linux-x86_64)
+ GOOS=linux
+ GOARCH=amd64
+ ;;
+linux-armhf)
+ GOOS=linux
+ GOARCH=arm
+ ;;
+linux-arm64)
+ GOOS=linux
+ GOARCH=arm64
+ ;;
+windows-x86_64)
+ GOOS=windows
+ GOARCH=amd64
+ ;;
+*)
+ echo "Unrecognised platform"
+ exit 1
+ ;;
+esac
+
+export PLATFORM
+export GOOS
+export GOARCH
--- /dev/null
+#!/bin/bash
+set -euxo pipefail
+cd "$(git rev-parse --show-toplevel)"
+source buildscripts/init.sh "$1"
+
+case $PLATFORM in
+linux-x86_64|linux-armhf|linux-arm64)
+ cd server
+ files=$(gofmt -l .) && [ -z "$files" ]
+
+ cd ../radio
+ files=$(gofmt -l .) && [ -z "$files" ]
+ ;;
+*)
+ echo "Skipping build on ${PLATFORM}"
+ exit 0
+ ;;
+esac
+
--- /dev/null
+#!/bin/bash
+set -euxo pipefail
+cd "$(git rev-parse --show-toplevel)"
+source buildscripts/init.sh "$1"
+
+case $PLATFORM in
+linux-x86_64|linux-armhf|linux-arm64)
+ cd server
+ go test
+
+ cd ../radio
+ go test
+ ;;
+*)
+ echo "Skipping build on ${PLATFORM}"
+ exit 0
+ ;;
+esac
+
+
+
package main
import (
- "code.octet-stream.net/broadcaster/internal/protocol"
"crypto/sha256"
"encoding/hex"
"io"
"net/http"
"os"
"path/filepath"
+
+ "code.octet-stream.net/broadcaster/internal/protocol"
)
type FilesMachine struct {