Files
snapd/bootloader/assets/generate.go
Maciej Borzecki 41bf1a3597 many: pick up special build time flags for invoking go while generating artifacts
Some packaging frameworks (dh-golang in partcular) invokes go generate. Our code
calls `go run ..` to generate some output files. In particular, when building
with Go modules support, we must pass -mod=vendor occasionally. Allow the build
code to set an environment variables with flags that shall be passed to go run.

Signed-off-by: Maciej Borzecki <maciej.zenon.borzecki@canonical.com>
2021-09-09 13:37:31 +02:00

24 lines
946 B
Go

// -*- Mode: Go; indent-tabs-mode: t -*-
/*
* Copyright (C) 2020 Canonical Ltd
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 3 as
* published by the Free Software Foundation.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
*/
package assets
//go:generate go run $GOINVOKEFLAGS ./genasset/main.go -name grub.cfg -in ./data/grub.cfg -out ./grub_cfg_asset.go
//go:generate go run $GOINVOKEFLAGS ./genasset/main.go -name grub-recovery.cfg -in ./data/grub-recovery.cfg -out ./grub_recovery_cfg_asset.go