Can build yq with no lua

This commit is contained in:
Mike Farah
2023-10-03 16:22:23 +11:00
parent 5fa41624c9
commit 6e65d44a98
7 changed files with 30 additions and 2 deletions
+9
View File
@@ -0,0 +1,9 @@
return {
["country"] = "Australia"; -- this place
["cities"] = {
"Sydney",
"Melbourne",
"Brisbane",
"Perth",
};
};
+2
View File
@@ -1,3 +1,5 @@
//go:build !yq_nolua
package yqlib
import (
+2
View File
@@ -1,3 +1,5 @@
//go:build !yq_nolua
package yqlib
import (
+4 -1
View File
@@ -1,3 +1,5 @@
//go:build !yq_nolua
package yqlib
import (
@@ -54,6 +56,7 @@ cities:
description: "Basic roundtrip",
skipDoc: true,
scenarioType: "roundtrip",
expression: `.cities[0] = "Adelaide"`,
input: `return {
["country"] = "Australia"; -- this place
["cities"] = {
@@ -67,7 +70,7 @@ cities:
expected: `return {
["country"] = "Australia";
["cities"] = {
"Sydney",
"Adelaide",
"Melbourne",
"Brisbane",
"Perth",
+11
View File
@@ -0,0 +1,11 @@
//go:build yq_nolua
package yqlib
func NewLuaEncoder(prefs LuaPreferences) Encoder {
return nil
}
func NewLuaDecoder(prefs LuaPreferences) Decoder {
return nil
}
+1
View File
@@ -155,6 +155,7 @@ Nonquoting
nosec
notoml
noxml
nolua
nullinput
onea
Oneshot
+1 -1
View File
@@ -1,2 +1,2 @@
#!/bin/bash
go build -tags yq_notoml -tags yq_noxml -tags yq_nojson -ldflags "-s -w" .
go build -tags "yq_nolua yq_notoml yq_noxml yq_nojson" -ldflags "-s -w" .