From 3c7828599c7b18c8f92d72bc4117790ef88847b8 Mon Sep 17 00:00:00 2001 From: Dan Kortschak Date: Mon, 17 May 2021 10:49:20 +0930 Subject: [PATCH] cmd/looper: simplify build constraints and document crippled build artifact --- cmd/looper/{circleci.go => not_pi.go} | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) rename cmd/looper/{circleci.go => not_pi.go} (62%) diff --git a/cmd/looper/circleci.go b/cmd/looper/not_pi.go similarity index 62% rename from cmd/looper/circleci.go rename to cmd/looper/not_pi.go index a3e7c1e9..b50833cc 100644 --- a/cmd/looper/circleci.go +++ b/cmd/looper/not_pi.go @@ -1,15 +1,15 @@ -// +build circleci +// +build !pi0,!pi3 /* DESCRIPTION - circleci.go defines a dummy initialisation command for running on circleci. + not_pi.go lets looper build on non-RPi environments, but leaves a + non-functional executable. AUTHORS - Ella Pietraroia - Scott Barnard + Dan Kortschak LICENSE - Copyright (C) 2020 the Australian Ocean Lab (AusOcean) + Copyright (C) 2021 the Australian Ocean Lab (AusOcean) It is free software: you can redistribute it and/or modify them under the terms of the GNU General Public License as published by the @@ -27,8 +27,12 @@ LICENSE package main -import "bitbucket.org/ausocean/utils/logger" +import ( + "bitbucket.org/ausocean/utils/logger" +) -const audioCmd = "" +const audioCmd = "play" -func initCommand(log *logger.Logger) {} +func initCommand(l *logger.Logger) { + panic("looper is intended to be run on a Raspberry Pi 0 or 3.") +}