forked from LaconicNetwork/kompose
drop status field from yamls
Signed-off-by: shubhindia <shubhindia123@gmail.com>
This commit is contained in:
parent
7826534666
commit
21d8dc8a81
@ -22,6 +22,7 @@ import (
|
|||||||
"os/exec"
|
"os/exec"
|
||||||
"path"
|
"path"
|
||||||
"path/filepath"
|
"path/filepath"
|
||||||
|
"regexp"
|
||||||
"strings"
|
"strings"
|
||||||
|
|
||||||
dockerlib "github.com/fsouza/go-dockerclient"
|
dockerlib "github.com/fsouza/go-dockerclient"
|
||||||
@ -274,6 +275,10 @@ func ConfigAnnotations(service kobject.ServiceConfig) map[string]string {
|
|||||||
// Print either prints to stdout or to file/s
|
// Print either prints to stdout or to file/s
|
||||||
func Print(name, path string, trailing string, data []byte, toStdout, generateJSON bool, f *os.File, provider string) (string, error) {
|
func Print(name, path string, trailing string, data []byte, toStdout, generateJSON bool, f *os.File, provider string) (string, error) {
|
||||||
file := ""
|
file := ""
|
||||||
|
// simple hack to remove status from the output
|
||||||
|
re := regexp.MustCompile(`(?s)status:.*`)
|
||||||
|
data = re.ReplaceAll(data, nil)
|
||||||
|
|
||||||
if generateJSON {
|
if generateJSON {
|
||||||
file = fmt.Sprintf("%s-%s.json", name, trailing)
|
file = fmt.Sprintf("%s-%s.json", name, trailing)
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user