From 437a34a0581876b7f761aaa5c8d7a1ed4e8da14d Mon Sep 17 00:00:00 2001 From: Pranav Gaikwad Date: Thu, 14 Sep 2023 16:07:46 -0400 Subject: [PATCH] :ghost: script to replace name & image (#64) Signed-off-by: Pranav Gaikwad --- go.sum | 2 ++ hack/update-settings.sh | 12 ++++++++++++ test-data/analysis-output.yaml | 2 ++ 3 files changed, 16 insertions(+) create mode 100755 hack/update-settings.sh diff --git a/go.sum b/go.sum index 7234076..f67cbe6 100644 --- a/go.sum +++ b/go.sum @@ -33,6 +33,7 @@ github.com/go-openapi/jsonpointer v0.19.5 h1:gZr+CIYByUqjcgeLXnQu2gHYQC9o73G2XUe github.com/go-openapi/jsonpointer v0.19.5/go.mod h1:Pl9vOtqEWErmShwVjC8pYs9cog34VGT37dQOVbmoatg= github.com/go-openapi/swag v0.19.5 h1:lTz6Ys4CmqqCQmZPBlbQENR1/GucA2bzYTE12Pw4tFY= github.com/go-openapi/swag v0.19.5/go.mod h1:POnQmlKehdgb5mhVOsnJFsivZCEZ/vjK9gh66Z9tfKk= +github.com/golang/groupcache v0.0.0-20200121045136-8c9f03a8e57e/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= github.com/golang/protobuf v1.3.1/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk= @@ -142,6 +143,7 @@ golang.org/x/text v0.8.0 h1:57P1ETyNKtuIjB4SRd15iJxuhj8Gc416Y78H3qgMh68= golang.org/x/text v0.8.0/go.mod h1:e1OnstbJyHTd6l/uOt8jFFHp6TRDWZR/bV3emEE/zU8= golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +google.golang.org/appengine v1.6.7/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= google.golang.org/genproto v0.0.0-20230110181048-76db0878b65f h1:BWUVssLB0HVOSY78gIdvk1dTVYtT1y8SBWtPYuTJ/6w= google.golang.org/genproto v0.0.0-20230110181048-76db0878b65f/go.mod h1:RGgjbofJ8xD9Sq1VVhDM1Vok1vRONV+rg+CjzG4SZKM= google.golang.org/grpc v1.54.0 h1:EhTqbhiYeixwWQtAEZAxmV9MGqcjEU2mFx52xCzNyag= diff --git a/hack/update-settings.sh b/hack/update-settings.sh new file mode 100755 index 0000000..6a98349 --- /dev/null +++ b/hack/update-settings.sh @@ -0,0 +1,12 @@ +#!/bin/bash + +# Set IMAGE and NAME environment variables, and run the script in root dir: +# $ IMAGE=quay.io/konveyor/kantra NAME=kantra ./hack/update-settings.sh + +image="${IMAGE:-quay.io/konveyor/kantra}" +name="${NAME:-kantra}" + +sed -i \ + -e "s,\(RootCommandName *string.*default:\"\)[^\"]*\",\1$name\"," \ + -e "s,\(RunnerImage *string.*default:\"\)[^\"]*\",\1$image\"," \ + ./cmd/settings.go diff --git a/test-data/analysis-output.yaml b/test-data/analysis-output.yaml index c9f0c89..8568513 100644 --- a/test-data/analysis-output.yaml +++ b/test-data/analysis-output.yaml @@ -137,6 +137,8 @@ category: mandatory labels: - konveyor.io/target=cloud-readiness + - konveyor.io/source + - konveyor.io/target - discovery incidents: - uri: file:///opt/input/source/target/classes/persistence.properties