Merge pull request #3721 from yiannistri/3593-fix-double-newline

fix: Avoid printing an extra newline when exporting resources
pull/3643/head
Hidde Beydals 2 years ago committed by GitHub
commit 10f8849e12
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -122,5 +122,6 @@ func printExport(export interface{}) error {
func resourceToString(data []byte) string { func resourceToString(data []byte) string {
data = bytes.Replace(data, []byte(" creationTimestamp: null\n"), []byte(""), 1) data = bytes.Replace(data, []byte(" creationTimestamp: null\n"), []byte(""), 1)
data = bytes.Replace(data, []byte("status: {}\n"), []byte(""), 1) data = bytes.Replace(data, []byte("status: {}\n"), []byte(""), 1)
data = bytes.TrimSpace(data)
return string(data) return string(data)
} }

@ -12,4 +12,3 @@ spec:
ref: ref:
branch: master branch: master
url: https://github.com/stefanprodan/podinfo url: https://github.com/stefanprodan/podinfo

@ -7,4 +7,3 @@ metadata:
spec: spec:
interval: 5m0s interval: 5m0s
url: https://stefanprodan.github.io/charts/podinfo url: https://stefanprodan.github.io/charts/podinfo

@ -10,4 +10,3 @@ spec:
name: creds name: creds
type: oci type: oci
url: oci://ghcr.io/stefanprodan/charts/podinfo url: oci://ghcr.io/stefanprodan/charts/podinfo

@ -8,4 +8,3 @@ spec:
interval: 5m0s interval: 5m0s
type: oci type: oci
url: oci://ghcr.io/stefanprodan/charts/podinfo url: oci://ghcr.io/stefanprodan/charts/podinfo

@ -14,4 +14,3 @@ spec:
providerRef: providerRef:
name: slack name: slack
summary: Slacktest Notification summary: Slacktest Notification

@ -11,4 +11,3 @@ spec:
provider: aws provider: aws
region: us-east-1 region: us-east-1
timeout: 30s timeout: 30s

@ -13,4 +13,3 @@ spec:
name: flux-system name: flux-system
timeout: 1m0s timeout: 1m0s
url: ssh://git@github.com/example/repo url: ssh://git@github.com/example/repo

@ -15,4 +15,3 @@ spec:
namespace: {{ .fluxns }} namespace: {{ .fluxns }}
version: '*' version: '*'
interval: 5m0s interval: 5m0s

@ -9,4 +9,3 @@ spec:
provider: generic provider: generic
timeout: 1m0s timeout: 1m0s
url: https://stefanprodan.github.io/podinfo url: https://stefanprodan.github.io/podinfo

@ -10,4 +10,3 @@ spec:
policy: policy:
semver: semver:
range: 5.0.x range: 5.0.x

@ -10,4 +10,3 @@ spec:
image: ghcr.io/test/podinfo image: ghcr.io/test/podinfo
interval: 1m0s interval: 1m0s
provider: generic provider: generic

@ -17,4 +17,3 @@ spec:
update: update:
path: ./clusters/my-cluster path: ./clusters/my-cluster
strategy: Setters strategy: Setters

@ -11,4 +11,3 @@ spec:
sourceRef: sourceRef:
kind: GitRepository kind: GitRepository
name: flux-system name: flux-system

@ -8,4 +8,3 @@ spec:
address: https://hooks.slack.com/services/mock address: https://hooks.slack.com/services/mock
channel: A channel with spacess channel: A channel with spacess
type: slack type: slack

@ -15,4 +15,3 @@ spec:
secretRef: secretRef:
name: webhook-token name: webhook-token
type: github type: github

@ -9,4 +9,3 @@ spec:
ref: ref:
tag: 6.3.5 tag: 6.3.5
url: oci://ghcr.io/stefanprodan/manifests/podinfo url: oci://ghcr.io/stefanprodan/manifests/podinfo

@ -11,4 +11,3 @@ spec:
secretRef: secretRef:
name: creds name: creds
url: oci://ghcr.io/stefanprodan/manifests/podinfo url: oci://ghcr.io/stefanprodan/manifests/podinfo

Loading…
Cancel
Save