Skip to content

Commit

Permalink
Change name of plugin MtaPlugin to multiapps
Browse files Browse the repository at this point in the history
JIRA:LMCROSSITXSADEPLOY-1397 Integrate MTA CLI plugin in CF community
plugin repo
  • Loading branch information
theghost5800 committed Apr 24, 2019
1 parent 03f355c commit 0bfe677
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 11 deletions.
6 changes: 3 additions & 3 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -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
4 changes: 2 additions & 2 deletions build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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() {
Expand All @@ -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
}
Expand Down
12 changes: 6 additions & 6 deletions mta_plugin.go → multiapps_plugin.go
Original file line number Diff line number Diff line change
Expand Up @@ -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{
Expand All @@ -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
Expand All @@ -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},
}
Expand All @@ -62,7 +62,7 @@ func (p *MtaPlugin) GetMetadata() plugin.PluginMetadata {
}

func main() {
plugin.Start(new(MtaPlugin))
plugin.Start(new(MultiappsPlugin))
}

func disableStdOut() {
Expand Down

0 comments on commit 0bfe677

Please sign in to comment.