Compare commits
4 commits
e6daab182c
...
843fd9d38a
Author | SHA1 | Date | |
---|---|---|---|
843fd9d38a | |||
b820acf809 | |||
86844eb713 | |||
4c555fe7f0 |
4 changed files with 11 additions and 7 deletions
|
@ -11,7 +11,6 @@ linters:
|
|||
- nakedret
|
||||
- revive
|
||||
- staticcheck # Now includes gosimple and stylecheck
|
||||
- typecheck
|
||||
- unconvert
|
||||
- unused
|
||||
- whitespace
|
||||
|
|
|
@ -23,9 +23,6 @@ ASSETS_DIR ?= assets
|
|||
.PHONY: default
|
||||
default: all
|
||||
|
||||
# Verify environment, and define PLUGIN_ID, PLUGIN_VERSION, HAS_SERVER and HAS_WEBAPP as needed.
|
||||
include build/setup.mk
|
||||
|
||||
ifneq ($(MM_DEBUG),)
|
||||
GO_BUILD_GCFLAGS = -gcflags "all=-N -l"
|
||||
else
|
||||
|
|
|
@ -5,9 +5,9 @@ ifeq ($(GO),)
|
|||
endif
|
||||
|
||||
# Gather build variables to inject into the manifest tool
|
||||
BUILD_HASH_SHORT = $(shell git rev-parse --short HEAD)
|
||||
BUILD_HASH_SHORT = $(shell git rev-parse --short HEAD 2>/dev/null)
|
||||
BUILD_TAG_LATEST = $(shell git describe --tags --match 'v*' --abbrev=0 2>/dev/null)
|
||||
BUILD_TAG_CURRENT = $(shell git tag --points-at HEAD)
|
||||
BUILD_TAG_CURRENT = $(shell git tag --points-at HEAD 2>/dev/null)
|
||||
|
||||
# Extract the plugin id from the manifest.
|
||||
PLUGIN_ID ?= $(shell pluginctl manifest get '{{"{{"}}.Id{{"}}"}}')
|
||||
|
|
10
manifest.go
10
manifest.go
|
@ -188,7 +188,15 @@ Examples:
|
|||
}
|
||||
|
||||
var buf bytes.Buffer
|
||||
if err := tmpl.Execute(&buf, *manifest); err != nil {
|
||||
if err := tmpl.Execute(&buf, struct {
|
||||
model.Manifest
|
||||
HasWebapp bool
|
||||
HasServer bool
|
||||
}{
|
||||
Manifest: *manifest,
|
||||
HasWebapp: HasWebappCode(manifest),
|
||||
HasServer: HasServerCode(manifest),
|
||||
}); err != nil {
|
||||
return fmt.Errorf("failed to execute template: %w", err)
|
||||
}
|
||||
|
||||
|
|
Reference in a new issue