Skip to content

Commit

Permalink
Remove Xcode dependency check (#793)
Browse files Browse the repository at this point in the history
* Remove Xcode dependency check

* Upgrade to latest stepman

* Bump versions
  • Loading branch information
ofalvai committed Jul 19, 2022
1 parent ec52f99 commit 7f794d6
Show file tree
Hide file tree
Showing 7 changed files with 3 additions and 77 deletions.
10 changes: 0 additions & 10 deletions _docs/step-development-guideline.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,16 +30,6 @@ deps:
- name: cmake
```

Steps can define dependencies which need to be available on the host machine but cannot be installed in an easy way (like using a single brew or apt-get command):

```
deps:
check_only:
- name: xcode
```

Currently, the only supported `check_only` dependency is `xcode`.

Other dependencies need to be installed and checked while the step is running or using other steps.

## Never depend on Environment Variables in your Step
Expand Down
2 changes: 1 addition & 1 deletion _tests/integration/version_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import (
)

const (
expectedCLIVersion = "1.49.0"
expectedCLIVersion = "1.49.1"
)

func Test_VersionOutput(t *testing.T) {
Expand Down
33 changes: 0 additions & 33 deletions bitrise/dependencies.go
Original file line number Diff line number Diff line change
Expand Up @@ -272,39 +272,6 @@ func checkIfAptPackageInstalled(packageName string) bool {
return (err == nil)
}

// DependencyTryCheckTool ...
func DependencyTryCheckTool(tool string) error {
var cmd *command.Model
errMsg := ""

switch tool {
case "xcode":
cmd = command.New("xcodebuild", "-version")
errMsg = "The full Xcode app is not installed, required for this step. You can install it from the App Store."
break
default:
cmdFields := strings.Fields(tool)
if len(cmdFields) >= 2 {
cmd = command.New(cmdFields[0], cmdFields[1:]...)
} else if len(cmdFields) == 1 {
cmd = command.New(cmdFields[0])
} else {
return fmt.Errorf("Invalid tool name (%s)", tool)
}
}

out, err := cmd.RunAndReturnTrimmedCombinedOutput()
if err != nil {
if errMsg != "" {
return errors.New(errMsg)
}
log.Infof("Output was: %s", out)
return fmt.Errorf("Dependency check failed for: %s", tool)
}

return nil
}

// InstallWithBrewIfNeeded ...
func InstallWithBrewIfNeeded(brewDep stepmanModels.BrewDepModel, isCIMode bool) error {
isDepInstalled := false
Expand Down
8 changes: 1 addition & 7 deletions cli/run_util.go
Original file line number Diff line number Diff line change
Expand Up @@ -366,7 +366,7 @@ func checkAndInstallStepDependencies(step stepmanModels.StepModel) error {
log.Infof(" * "+colorstring.Green("[OK]")+" Step dependency (%s) installed, available.", aptGetDep.GetBinaryName())
}
default:
return errors.New("Unsupported os")
return errors.New("unsupported os")
}
} else if len(step.Dependencies) > 0 {
log.Info("Deprecated dependencies found")
Expand All @@ -385,12 +385,6 @@ func checkAndInstallStepDependencies(step stepmanModels.StepModel) error {
isSkippedBecauseOfPlatform = true
}
break
case depManagerTryCheck:
err := bitrise.DependencyTryCheckTool(dep.Name)
if err != nil {
return err
}
break
default:
return errors.New("Not supported dependency (" + dep.Manager + ") (" + dep.Name + ")")
}
Expand Down
1 change: 0 additions & 1 deletion gows.yml

This file was deleted.

24 changes: 0 additions & 24 deletions vendor/modules.txt
Original file line number Diff line number Diff line change
@@ -1,9 +1,3 @@
# github.com/Masterminds/semver v1.5.0
## explicit
# github.com/Masterminds/vcs v1.13.3
## explicit
# github.com/armon/go-radix v1.0.0
## explicit
# github.com/bitrise-io/colorstring v0.0.0-20180614154802-a8cd70115192
github.com/bitrise-io/colorstring
# github.com/bitrise-io/envman v0.0.0-20220401145857-d11e00a5dc55
Expand Down Expand Up @@ -44,41 +38,27 @@ github.com/bitrise-io/stepman/cli
github.com/bitrise-io/stepman/models
github.com/bitrise-io/stepman/stepman
github.com/bitrise-io/stepman/version
# github.com/boltdb/bolt v1.3.1
## explicit
# github.com/cpuguy83/go-md2man/v2 v2.0.1
github.com/cpuguy83/go-md2man/v2/md2man
# github.com/davecgh/go-spew v1.1.1
github.com/davecgh/go-spew/spew
# github.com/gofrs/uuid v4.2.0+incompatible
## explicit
github.com/gofrs/uuid
# github.com/golang/dep v0.5.4
## explicit
# github.com/golang/protobuf v1.5.2
## explicit
# github.com/hashicorp/go-cleanhttp v0.5.2
github.com/hashicorp/go-cleanhttp
# github.com/hashicorp/go-retryablehttp v0.7.0
github.com/hashicorp/go-retryablehttp
# github.com/hashicorp/go-version v1.4.0
## explicit
github.com/hashicorp/go-version
# github.com/jmank88/nuts v0.4.0
## explicit
# github.com/nightlyone/lockfile v1.0.0
## explicit
# github.com/pelletier/go-toml v1.9.5
## explicit
# github.com/pmezard/go-difflib v1.0.0
github.com/pmezard/go-difflib/difflib
# github.com/russross/blackfriday/v2 v2.1.0
github.com/russross/blackfriday/v2
# github.com/ryanuber/go-glob v1.0.0
## explicit
github.com/ryanuber/go-glob
# github.com/sdboyer/constext v0.0.0-20170321163424-836a14457353
## explicit
# github.com/sirupsen/logrus v1.8.1
## explicit
github.com/sirupsen/logrus
Expand All @@ -92,8 +72,6 @@ github.com/urfave/cli
# golang.org/x/crypto v0.0.0-20220315160706-3147a52a75dd
## explicit
golang.org/x/crypto/ssh/terminal
# golang.org/x/sync v0.0.0-20220513210516-0976fa681c29
## explicit
# golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a
## explicit
golang.org/x/sys/internal/unsafeheader
Expand All @@ -102,8 +80,6 @@ golang.org/x/sys/unix
golang.org/x/sys/windows
# golang.org/x/term v0.0.0-20210927222741-03fcf44c2211
golang.org/x/term
# google.golang.org/protobuf v1.28.0
## explicit
# gopkg.in/yaml.v2 v2.4.0
## explicit
gopkg.in/yaml.v2
Expand Down
2 changes: 1 addition & 1 deletion version/version.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package version

// VERSION ...
const VERSION = "1.49.0"
const VERSION = "1.49.1"

0 comments on commit 7f794d6

Please sign in to comment.