From 0bfe67799e4082a23f03a664ac4cb3afa30483fa Mon Sep 17 00:00:00 2001 From: theghost5800 Date: Wed, 24 Apr 2019 11:50:37 +0300 Subject: [PATCH] Change name of plugin MtaPlugin to multiapps JIRA:LMCROSSITXSADEPLOY-1397 Integrate MTA CLI plugin in CF community plugin repo --- .gitignore | 6 +++--- build.sh | 4 ++-- mta_plugin.go => multiapps_plugin.go | 12 ++++++------ 3 files changed, 11 insertions(+), 11 deletions(-) rename mta_plugin.go => multiapps_plugin.go (86%) diff --git a/.gitignore b/.gitignore index f8e8ce8..393a842 100644 --- a/.gitignore +++ b/.gitignore @@ -5,6 +5,6 @@ mta-op-*/ .DS_Store */.DS_Store .idea -mta_plugin_darwin_amd64 -mta_plugin_linux_amd64 -mta_plugin_windows_amd64.exe +multiapps_plugin_darwin_amd64 +multiapps_plugin_linux_amd64 +multiapps_plugin_windows_amd64.exe \ No newline at end of file diff --git a/build.sh b/build.sh index f6b64ed..54ecc4c 100755 --- a/build.sh +++ b/build.sh @@ -7,7 +7,7 @@ function build() { GOOS=$platform GOARCH=$arch go build \ -ldflags "-X main.Version=${version}" \ - -o mta_plugin_${platform}_${arch} + -o multiapps_plugin_${platform}_${arch} } function main() { @@ -22,7 +22,7 @@ function main() { build $version $platform "amd64" #Make windows binary executable if [[ $platform == "windows" ]] ; then - mv mta_plugin_${platform}_amd64 mta_plugin_${platform}_amd64.exe + mv multiapps_plugin_${platform}_amd64 multiapps_plugin_${platform}_amd64.exe fi done } diff --git a/mta_plugin.go b/multiapps_plugin.go similarity index 86% rename from mta_plugin.go rename to multiapps_plugin.go index dd88d02..1f4d607 100644 --- a/mta_plugin.go +++ b/multiapps_plugin.go @@ -16,8 +16,8 @@ import ( // Version is the version of the CLI plugin. It is injected on linking time. var Version string = "0.0.0" -// MtaPlugin represents a cf CLI plugin for executing operations on MTAs -type MtaPlugin struct{} +// MultiappsPlugin represents a cf CLI plugin for executing operations on MTAs +type MultiappsPlugin struct{} // Commands contains the commands supported by this plugin var Commands = []commands.Command{ @@ -32,7 +32,7 @@ var Commands = []commands.Command{ } // Run runs this plugin -func (p *MtaPlugin) Run(cliConnection plugin.CliConnection, args []string) { +func (p *MultiappsPlugin) Run(cliConnection plugin.CliConnection, args []string) { disableStdOut() if args[0] == "CLI-MESSAGE-UNINSTALL" { return @@ -49,9 +49,9 @@ func (p *MtaPlugin) Run(cliConnection plugin.CliConnection, args []string) { } // GetMetadata returns the metadata of this plugin -func (p *MtaPlugin) GetMetadata() plugin.PluginMetadata { +func (p *MultiappsPlugin) GetMetadata() plugin.PluginMetadata { metadata := plugin.PluginMetadata{ - Name: "MtaPlugin", + Name: "multiapps", Version: parseSemver(Version), MinCliVersion: plugin.VersionType{Major: 6, Minor: 7, Build: 0}, } @@ -62,7 +62,7 @@ func (p *MtaPlugin) GetMetadata() plugin.PluginMetadata { } func main() { - plugin.Start(new(MtaPlugin)) + plugin.Start(new(MultiappsPlugin)) } func disableStdOut() {