Skip to content

Commit

Permalink
Use xcconfig package from go-xcode (#19)
Browse files Browse the repository at this point in the history
  • Loading branch information
Bence1001 authored Oct 8, 2021
1 parent da0aeff commit 874e944
Show file tree
Hide file tree
Showing 5 changed files with 60 additions and 28 deletions.
6 changes: 3 additions & 3 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ module github.com/bitrise-steplib/steps-xcode-build-for-test
go 1.17

require (
github.com/bitrise-io/go-steputils v0.0.0-20210924114124-851d30b88892
github.com/bitrise-io/go-utils v0.0.0-20210924090918-3e7a04d0da9d
github.com/bitrise-io/go-xcode v0.0.0-20210928140350-ec12eb8661c0
github.com/bitrise-io/go-steputils v0.0.0-20210929162140-866a65a1e14a
github.com/bitrise-io/go-utils v0.0.0-20210930092040-cceb74a5ac24
github.com/bitrise-io/go-xcode v0.0.0-20211007125122-93e3a53643a2
github.com/kballard/go-shellquote v0.0.0-20180428030007-95032a82bc51
golang.org/x/text v0.3.7 // indirect
)
Expand Down
22 changes: 12 additions & 10 deletions go.sum
Original file line number Diff line number Diff line change
@@ -1,21 +1,24 @@
github.com/bitrise-io/go-plist v0.0.0-20210301100253-4b1a112ccd10 h1:/2OyBFI7GjYKexBPcfTPvKFz8Ks7qYzkkz2SQ8aiJgc=
github.com/bitrise-io/go-plist v0.0.0-20210301100253-4b1a112ccd10/go.mod h1:pARutiL3kEuRLV3JvswidvfCj+9Y3qMZtji2BDqLFsA=
github.com/bitrise-io/go-steputils v0.0.0-20210924114124-851d30b88892 h1:aD5jTvdf5zIngQ5HeR7Idteae4yaXLqJGn8PE4k2xtI=
github.com/bitrise-io/go-steputils v0.0.0-20210924114124-851d30b88892/go.mod h1:6Y7Dl40gwgW9YG1RAWcjFBk1u9uotuix8g2IkVTXK34=
github.com/bitrise-io/go-utils v0.0.0-20210924090918-3e7a04d0da9d h1:jU5wvShTLKSo2gYlIBoXONS2MRRL8UwiPOSqi88JF2k=
github.com/bitrise-io/go-steputils v0.0.0-20210929162140-866a65a1e14a h1:RMwXuRF73TEvZejB2f048FUiEQtzwc0MGFfQHJ2v+sk=
github.com/bitrise-io/go-steputils v0.0.0-20210929162140-866a65a1e14a/go.mod h1:6Y7Dl40gwgW9YG1RAWcjFBk1u9uotuix8g2IkVTXK34=
github.com/bitrise-io/go-utils v0.0.0-20210924090918-3e7a04d0da9d/go.mod h1:Vi4MHnaZVL3PVoPPA/Yp6g2pzntkDH8LGiRSY7qw6KQ=
github.com/bitrise-io/go-xcode v0.0.0-20210927150020-dd11ae1c9008 h1:9Pn7LCh/W3WnqJ4G3UGJCOn8cYwJELzygZvMR2Zwsow=
github.com/bitrise-io/go-xcode v0.0.0-20210927150020-dd11ae1c9008/go.mod h1:R+mDPZyTUBfd/wpN8bl67BYsDaCTgS6FDwBSZG4UmGA=
github.com/bitrise-io/go-xcode v0.0.0-20210928140350-ec12eb8661c0 h1:gihGjCEtxIM/i0v8jCfRLn6sUG0lBaJ+EBzrdInRXX8=
github.com/bitrise-io/go-xcode v0.0.0-20210928140350-ec12eb8661c0/go.mod h1:R+mDPZyTUBfd/wpN8bl67BYsDaCTgS6FDwBSZG4UmGA=
github.com/bitrise-io/go-utils v0.0.0-20210930092040-cceb74a5ac24 h1:T/tR1FSSH2lUYv9gS2US5ICafIlPogHgh4Jo+LoEv2g=
github.com/bitrise-io/go-utils v0.0.0-20210930092040-cceb74a5ac24/go.mod h1:Vi4MHnaZVL3PVoPPA/Yp6g2pzntkDH8LGiRSY7qw6KQ=
github.com/bitrise-io/go-xcode v0.0.0-20211007125122-93e3a53643a2 h1:85N/eH+myTnLA58/MdfppOhAGw6VwuQfzYLZ1akKCi8=
github.com/bitrise-io/go-xcode v0.0.0-20211007125122-93e3a53643a2/go.mod h1:qXTBqp2B9eCsNNLLhhWDkHlO238KKHAb2hsJZI+Zd/0=
github.com/bitrise-io/pkcs12 v0.0.0-20210430063833-0da06eb56630/go.mod h1:UiXKNs0essbC14a2TvGlnUKo9isP9m4guPrp8KJHJpU=
github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=
github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
github.com/dgrijalva/jwt-go v3.2.0+incompatible/go.mod h1:E3ru+11k8xSBh+hMPgOLZmtrrCbhqsmaPHjLKYnJCaQ=
github.com/fullsailor/pkcs7 v0.0.0-20190404230743-d7302db945fa/go.mod h1:KnogPXtdwXqoenmZCw6S+25EAm2MkxbG0deNDu4cbSA=
github.com/google/go-cmp v0.5.5 h1:Khx7svrCpmxxtHBq5j2mp/xVjsi8hQMfNLvJFAlrGgU=
github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
github.com/google/go-cmp v0.5.2/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
github.com/google/go-cmp v0.5.6 h1:BKbKCqvP6I+rmFHt06ZmyQtvB8xAkWdhFyr0ZUNZcxQ=
github.com/google/go-cmp v0.5.6/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
github.com/google/go-querystring v1.1.0/go.mod h1:Kcdr2DB4koayq7X8pmAG4sNG59So17icRSOU623lUBU=
github.com/hashicorp/go-cleanhttp v0.5.1/go.mod h1:JpRdi6/HCYpAwUzNwuwqhbovhLtngrth3wmdIIUrZ80=
github.com/hashicorp/go-cleanhttp v0.5.2/go.mod h1:kO/YDlP8L1346E6Sodw+PrpBSV4/SoxCXGY6BqNFT48=
github.com/hashicorp/go-hclog v0.9.2/go.mod h1:5CU+agLiy3J7N7QjHK5d05KxGsuXiQLrjA0H7acj2lQ=
github.com/hashicorp/go-retryablehttp v0.7.0/go.mod h1:vAew36LZh98gCBJNLH42IQ1ER/9wtLZZ8meHqQvEYWY=
github.com/hashicorp/go-version v1.3.0 h1:McDWVJIU/y+u1BRV06dPaLfLCaT7fUTJLp5r04x7iNw=
Expand Down Expand Up @@ -44,7 +47,6 @@ golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7w
golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo=
golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
golang.org/x/text v0.3.7 h1:olpwvP2KacW1ZWvsR7uQhoyTYvKAupfQrRGBFM352Gk=
golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ=
golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
Expand Down
16 changes: 5 additions & 11 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ import (
"github.com/bitrise-io/go-utils/pathutil"
"github.com/bitrise-io/go-utils/stringutil"
"github.com/bitrise-io/go-xcode/utility"
"github.com/bitrise-io/go-xcode/xcconfig"
"github.com/bitrise-io/go-xcode/xcodebuild"
cache "github.com/bitrise-io/go-xcode/xcodecache"
"github.com/bitrise-io/go-xcode/xcodeproject/serialized"
Expand Down Expand Up @@ -149,17 +150,10 @@ func main() {
}
}

var xcconfigPath string
if cfg.XCConfigContent != "" {
dir, err := pathutil.NewPathProvider().CreateTempDir("")
if err != nil {
failf("Unable to create temp dir for writing XCConfig: %s", err)
}
xcconfigPath = filepath.Join(dir, "temp.xcconfig")

if err = fileutil.NewFileManager().Write(xcconfigPath, cfg.XCConfigContent, 0644); err != nil {
failf("unable to write XCConfig content into file: %s", err, err)
}
xcconfigWriter := xcconfig.NewWriter(pathutil.NewPathProvider(), fileutil.NewFileManager())
xcconfigPath, err := xcconfigWriter.Write(cfg.XCConfigContent)
if err != nil {
failf(err.Error())
}

xcodeBuildCmd := xcodebuild.NewCommandBuilder(absProjectPath, xcworkspace.IsWorkspace(absProjectPath), "", factory)
Expand Down
35 changes: 35 additions & 0 deletions vendor/github.com/bitrise-io/go-xcode/xcconfig/xcconfig.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 5 additions & 4 deletions vendor/modules.txt
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
# github.com/bitrise-io/go-plist v0.0.0-20210301100253-4b1a112ccd10
## explicit; go 1.15
github.com/bitrise-io/go-plist
# github.com/bitrise-io/go-steputils v0.0.0-20210924114124-851d30b88892
# github.com/bitrise-io/go-steputils v0.0.0-20210929162140-866a65a1e14a
## explicit; go 1.16
github.com/bitrise-io/go-steputils/cache
github.com/bitrise-io/go-steputils/output
github.com/bitrise-io/go-steputils/ruby
github.com/bitrise-io/go-steputils/stepconf
github.com/bitrise-io/go-steputils/tools
# github.com/bitrise-io/go-utils v0.0.0-20210924090918-3e7a04d0da9d
# github.com/bitrise-io/go-utils v0.0.0-20210930092040-cceb74a5ac24
## explicit; go 1.16
github.com/bitrise-io/go-utils/colorstring
github.com/bitrise-io/go-utils/command
Expand All @@ -23,10 +23,11 @@ github.com/bitrise-io/go-utils/pretty
github.com/bitrise-io/go-utils/sliceutil
github.com/bitrise-io/go-utils/stringutil
github.com/bitrise-io/go-utils/ziputil
# github.com/bitrise-io/go-xcode v0.0.0-20210928140350-ec12eb8661c0
## explicit; go 1.15
# github.com/bitrise-io/go-xcode v0.0.0-20211007125122-93e3a53643a2
## explicit; go 1.16
github.com/bitrise-io/go-xcode/models
github.com/bitrise-io/go-xcode/utility
github.com/bitrise-io/go-xcode/xcconfig
github.com/bitrise-io/go-xcode/xcodebuild
github.com/bitrise-io/go-xcode/xcodecache
github.com/bitrise-io/go-xcode/xcodeproject/serialized
Expand Down

0 comments on commit 874e944

Please sign in to comment.