Removing architecture attribute from plugin struct, adding switch statement for GOARCH mapping

This commit is contained in:
cbrgm 2018-08-08 21:41:01 +02:00
commit b7ceb78f28
3 changed files with 18 additions and 6 deletions

View file

@ -11,7 +11,6 @@ import (
type (
Plugin struct {
Config Config
Architecture string
BuildInVersion string
}
@ -40,7 +39,7 @@ func (p Plugin) Exec() error {
// Check if buildIn plugin version equals
// plugin version declared in drone.yml
if !versionsEqual(p.BuildInVersion, p.Config.HugoVersion) {
hugoPath, err := download.Get(p.Config.HugoVersion, p.Architecture)
hugoPath, err := download.Get(p.Config.HugoVersion)
if err != nil {
return err
}