From ade0cb89e9710ec41d4aa1f3ba2ac7e96eba892f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kriszti=C3=A1n=20G=C3=B6drei?= Date: Fri, 14 Jul 2023 13:29:32 +0200 Subject: [PATCH] Update ios and android workflows (#265) * Use pointer receiver in iOS scanner assigned funcs * Update Android scanner workflow IDs and add summaries * Update ios workflow ids and add summaries * rename primary to test * Remove primary workflow validation * Update ios workflow ids, summaries and descriptions * Update workflow ids, summaries and descriptions in ios and android integration tests * Update integration tests * Move utility android funcs to utility.go * Improve addDescription and addSummary * Rename test workflow to verification workflow * Replace smart quotes with regular quotes * go mod tidy on _manual-config --- _manual-config/go.mod | 11 +- _manual-config/go.sum | 45 +++- _tests/integration/android_test.go | 104 ++++---- _tests/integration/fastlane_test.go | 25 +- _tests/integration/ios_test.go | 291 +++++++++-------------- _tests/integration/mac_test.go | 10 +- _tests/integration/manual_config_test.go | 49 ++-- models/configbuilder.go | 21 +- models/workflowbuilder.go | 2 + scanner/config_test.go | 2 +- scanner/errors.go | 16 +- scanner/errors_test.go | 10 +- scanners/android/android.go | 220 +++++++++-------- scanners/android/const.go | 16 -- scanners/android/utility.go | 204 +++++++--------- scanners/ios/ios.go | 10 +- scanners/ios/utility.go | 2 +- scanners/ios/workflow.go | 118 ++++++--- 18 files changed, 579 insertions(+), 577 deletions(-) delete mode 100644 scanners/android/const.go diff --git a/_manual-config/go.mod b/_manual-config/go.mod index 6ea57156..6bc156e8 100644 --- a/_manual-config/go.mod +++ b/_manual-config/go.mod @@ -6,6 +6,13 @@ replace github.com/bitrise-io/bitrise-init => ../ require github.com/bitrise-io/bitrise-init v0.0.0-20220216150510-ee1c4fb90ff6 +require ( + github.com/Masterminds/semver/v3 v3.2.1 // indirect + github.com/bitrise-io/go-flutter v0.1.0 // indirect + github.com/bitrise-io/go-utils/v2 v2.0.0-alpha.18 // indirect + gopkg.in/yaml.v3 v3.0.1 // indirect +) + require ( github.com/beevik/etree v1.1.0 // indirect github.com/bitrise-io/bitrise v0.0.0-20210519130014-380842fb41c1 // indirect @@ -13,11 +20,11 @@ require ( github.com/bitrise-io/go-plist v0.0.0-20210301100253-4b1a112ccd10 // indirect github.com/bitrise-io/go-steputils v1.0.1 // indirect github.com/bitrise-io/go-utils v1.0.1 // indirect - github.com/bitrise-io/go-xcode v1.0.6 // indirect + github.com/bitrise-io/go-xcode v1.0.12 // indirect github.com/bitrise-io/goinp v0.0.0-20210504152833-8559b0680ab1 // indirect github.com/bitrise-io/stepman v0.0.0-20210517135458-203f7a48d37a // indirect github.com/ryanuber/go-glob v1.0.0 // indirect - golang.org/x/crypto v0.6.1-0.20230215202200-ebe92624d142 // indirect // indirect + golang.org/x/crypto v0.6.1-0.20230215202200-ebe92624d142 // indirect; indirect // indirect golang.org/x/sys v0.5.0 // indirect golang.org/x/term v0.5.0 // indirect golang.org/x/text v0.7.0 // indirect diff --git a/_manual-config/go.sum b/_manual-config/go.sum index 5ca73147..aa02ef41 100644 --- a/_manual-config/go.sum +++ b/_manual-config/go.sum @@ -1,4 +1,6 @@ github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= +github.com/Masterminds/semver/v3 v3.2.1 h1:RN9w6+7QoMeJVGyfmbcgs28Br8cvmnucEXnY0rYXWg0= +github.com/Masterminds/semver/v3 v3.2.1/go.mod h1:qvl/7zhW3nngYb5+80sSMF+FG2BjYrf8m9wsX0PNOMQ= github.com/beevik/etree v1.1.0 h1:T0xke/WvNtMoCqgzPhkX2r4rjY3GDZFi+FjpRZY2Jbs= github.com/beevik/etree v1.1.0/go.mod h1:r8Aw8JqVegEf0w2fDnATrX9VpkMcyFeM0FhwO62wh+A= github.com/bitrise-io/bitrise v0.0.0-20210519130014-380842fb41c1 h1:PERqeGZZkMrGYSSN/Stk+YkhErgdk37aVqc5UgnIEoo= @@ -7,6 +9,8 @@ github.com/bitrise-io/colorstring v0.0.0-20180614154802-a8cd70115192/go.mod h1:C github.com/bitrise-io/envman v0.0.0-20200512105748-919e33f391ee/go.mod h1:m8pTp1o3Sw9uzDxb1WRm5IBRnMau2iOvPMSnRCAhQNI= github.com/bitrise-io/envman v0.0.0-20210517135508-b2b4fe89eac5 h1:3jVXjsejV+1EW9Sp7ef+sMinD0J3HFsPgh4Du6ctqZc= github.com/bitrise-io/envman v0.0.0-20210517135508-b2b4fe89eac5/go.mod h1:m8pTp1o3Sw9uzDxb1WRm5IBRnMau2iOvPMSnRCAhQNI= +github.com/bitrise-io/go-flutter v0.1.0 h1:ZWtCB5xbOip4sZA09swbKupbTdUo1V6z/GO6RBm9a2Y= +github.com/bitrise-io/go-flutter v0.1.0/go.mod h1:K7fIbZ7Ibk+lwu+2RT63ypiffIUMjLue1yr9xKxp8go= 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 v1.0.1 h1:lwPl2W1njfANrBoTCkuqOOYbTha263ZFqoWQH0fwhaY= @@ -15,10 +19,10 @@ github.com/bitrise-io/go-utils v0.0.0-20210505091801-98b7dc39ee61/go.mod h1:nhda github.com/bitrise-io/go-utils v0.0.0-20210505121718-07411d72e36e/go.mod h1:nhdaDQFvaMny1CugVV6KjK92/q97ENo0RuKSW5I4fbA= github.com/bitrise-io/go-utils v1.0.1 h1:e7mepVBkVN1DXRPESNXb0djEw6bxB6B93p/Q74zzcvk= github.com/bitrise-io/go-utils v1.0.1/go.mod h1:ZY1DI+fEpZuFpO9szgDeICM4QbqoWVt0RSY3tRI1heY= -github.com/bitrise-io/go-xcode v1.0.3 h1:uj9Yx62szJ9zGKTLuPaS0k1E9ldtCiOm17wivi5u9+4= -github.com/bitrise-io/go-xcode v1.0.3/go.mod h1:Y0Wu2dXm0MilJ/4D3+gPHaNMlUcP+1DjIPoLPykq7wY= -github.com/bitrise-io/go-xcode v1.0.6 h1:hSKwkDXUn9/gMk6HiJRUvurGWelfQEBWcO7JAvXi+y8= -github.com/bitrise-io/go-xcode v1.0.6/go.mod h1:Y0Wu2dXm0MilJ/4D3+gPHaNMlUcP+1DjIPoLPykq7wY= +github.com/bitrise-io/go-utils/v2 v2.0.0-alpha.18 h1:+JEzJ3N4FWxnMS9n6RiBEc9s5w4ZR8NW1Tz061mhn3g= +github.com/bitrise-io/go-utils/v2 v2.0.0-alpha.18/go.mod h1:Laih4ji980SQkRgdnMCH0g4u2GZI/5nnbqmYT9UfKFQ= +github.com/bitrise-io/go-xcode v1.0.12 h1:r8hziEOr6mV6XLWv8ZXZ4hgGyNEG+JzdU/68A+Ws42g= +github.com/bitrise-io/go-xcode v1.0.12/go.mod h1:Y0Wu2dXm0MilJ/4D3+gPHaNMlUcP+1DjIPoLPykq7wY= github.com/bitrise-io/goinp v0.0.0-20210504152833-8559b0680ab1 h1:iQZl/dKHp14xol7ye4e9FaSrw8o27TF5/nv3aUDfdD0= github.com/bitrise-io/goinp v0.0.0-20210504152833-8559b0680ab1/go.mod h1:iRbd8zAXLeNy+0gic0eqNCxXvDGe8ZEY/uYX2CCeAoo= github.com/bitrise-io/gows v0.0.0-20210505125306-dd92ff463938/go.mod h1:3Cp9ceJ8wHl1Av6oEE2ff1iWaYLliQuD+oaNdyM0NWQ= @@ -32,6 +36,7 @@ github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSs 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/fullsailor/pkcs7 v0.0.0-20190404230743-d7302db945fa/go.mod h1:KnogPXtdwXqoenmZCw6S+25EAm2MkxbG0deNDu4cbSA= +github.com/gofrs/uuid v4.3.1+incompatible/go.mod h1:b2aQJv3Z4Fp6yNu3cdSllBxTCLRxnplIgP/c0N/04lM= github.com/google/go-cmp v0.5.5/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= @@ -39,6 +44,7 @@ github.com/hashicorp/go-cleanhttp v0.5.1/go.mod h1:JpRdi6/HCYpAwUzNwuwqhbovhLtng 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-retryablehttp v0.7.1/go.mod h1:vAew36LZh98gCBJNLH42IQ1ER/9wtLZZ8meHqQvEYWY= github.com/hashicorp/go-version v1.3.0/go.mod h1:fltr4n8CU8Ke44wwGCBoEymUuxUHl09ZGVZPK5anwXA= github.com/inconshreveable/mousetrap v1.0.0/go.mod h1:PxqpIevigyE2G7u3NXJIT2ANytuPF1OarO4DADm73n8= github.com/jessevdk/go-flags v1.4.0/go.mod h1:4FA24M0QyGHXBuZZK/XkWh8h0e1EYbRYJSGM75WSRxI= @@ -47,6 +53,7 @@ github.com/kr/pretty v0.2.1/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfn github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= github.com/kr/text v0.1.0 h1:45sCR5RtlFHMR4UwH9sdQ5TC8v0qDQCHnXt+kaKSTVE= github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= +github.com/mitchellh/mapstructure v1.5.0/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= @@ -59,23 +66,37 @@ github.com/sirupsen/logrus v1.8.1/go.mod h1:yWOB1SBYBC5VeMP7gHvWumXLIWorT60ONWic github.com/spf13/pflag v1.0.5/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/objx v0.3.0/go.mod h1:qt09Ya8vawLte6SNmTgCsAVtYtaKzEcn8ATUoHMkEqE= +github.com/stretchr/objx v0.4.0/go.mod h1:YvHI0jy2hoMjB+UWwv71VJQ9isScKT/TqJzVSSt89Yw= +github.com/stretchr/objx v0.5.0 h1:1zr/of2m5FGMsad5YfcqgdqdWrIhu+EBEJRhR1U7z/c= +github.com/stretchr/objx v0.5.0/go.mod h1:Yh+to48EsGEfYuaHDzXPcE3xhTkx73EhmCGUpEOglKo= github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= github.com/stretchr/testify v1.5.1/go.mod h1:5W2xD1RspED5o8YsWQXVCued0rvSQ+mT+I5cxcmMvtA= -github.com/stretchr/testify v1.7.0 h1:nwc3DEeHmmLAfoZucVR881uASk0Mfjw8xYJ99tb5CcY= github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= +github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= +github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU= +github.com/stretchr/testify v1.8.1/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4= +github.com/stretchr/testify v1.8.3 h1:RP3t2pwF7cMEbC1dqtB6poj3niw/9gnV4Cjg5oW5gtY= +github.com/stretchr/testify v1.8.3/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo= github.com/urfave/cli v1.22.5/go.mod h1:Gos4lmkARVdJ6EkW0WaNv/tZAAMe9V7XWyB60NtXRu0= github.com/whilp/git-urls v1.0.0/go.mod h1:J16SAmobsqc3Qcy98brfl5f5+e0clUvg1krgwk/qCfE= +github.com/yuin/goldmark v1.4.13/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5taEt/CY= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= golang.org/x/crypto v0.0.0-20200220183623-bac4c82f6975/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20210503195802-e9a32991a82e/go.mod h1:P+XmwS30IXTQdn5tA2iutPOUgjI07+tq3H3K9MVA1s8= -golang.org/x/crypto v0.0.0-20211202192323-5770296d904e h1:MUP6MR3rJ7Gk9LEia0LP2ytiH6MuCfs7qYz+47jGdD8= +golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= golang.org/x/crypto v0.0.0-20211202192323-5770296d904e/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= golang.org/x/crypto v0.6.1-0.20230215202200-ebe92624d142 h1:6FrMYOmITa8TPF0uNY6SCU4Z68JxTSnlFPFn992MoIw= golang.org/x/crypto v0.6.1-0.20230215202200-ebe92624d142/go.mod h1:OFC/31mSvZgRz0V1QTNCzfAI1aIRzbiufJtkMIlEp58= +golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4= golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= +golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= golang.org/x/net v0.0.0-20211112202133-69e39bad7dc2/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= +golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= +golang.org/x/net v0.6.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs= +golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191026070338-33540a1f6037/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= @@ -84,24 +105,27 @@ golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210503173754-0981d6026fa6/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20211205182925-97ca703d548d h1:FjkYO/PPp4Wi0EAUOVLxePm7qVW4r4ctbWpURyuOD0E= golang.org/x/sys v0.0.0-20211205182925-97ca703d548d/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.2.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.5.0 h1:MUK/U/4lj1t1oPg0HfuXDN/Z1wv31ZJ/YcPiGccS4DU= golang.org/x/sys v0.5.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/term v0.0.0-20210503060354-a79de5458b56/go.mod h1:tfny5GFUkzUvx4ps4ajbZsCe5lw1metzhBm9T3x7oIY= -golang.org/x/term v0.0.0-20210927222741-03fcf44c2211 h1:JGgROgKl9N8DuW20oFS5gxc+lE67/N3FcwmBPMe7ArY= golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= golang.org/x/term v0.5.0 h1:n2a8QNdAb0sZNpU9R1ALUXBbY+w51fCQDN+7EdxNBsY= golang.org/x/term v0.5.0/go.mod h1:jMB1sMXY+tzblOD4FWmEbocvup2/aLOaQEp7JmGp78k= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= 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/text v0.7.0 h1:4BRB4x83lYWy72KwLD/qYDuTu7q9PjSagHvijDw7cLo= golang.org/x/text v0.7.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= +golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc= +golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk= @@ -113,6 +137,7 @@ gopkg.in/yaml.v2 v2.2.8/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY= gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ= gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= -gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b h1:h8qDotaEPuJATrMmW04NCwg7v22aHH28wwpauUhK9Oo= gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= +gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= +gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= howett.net/plist v1.0.0/go.mod h1:lqaXoTrLY4hg8tnEzNru53gicrbv7rrk+2xJA/7hw9g= diff --git a/_tests/integration/android_test.go b/_tests/integration/android_test.go index 629c06cf..0810f48c 100644 --- a/_tests/integration/android_test.go +++ b/_tests/integration/android_test.go @@ -127,13 +127,12 @@ configs: default_step_lib_source: https://github.com/bitrise-io/bitrise-steplib.git project_type: android workflows: - deploy: - description: | - Deploys app using [Deploy to bitrise.io Step](https://devcenter.bitrise.io/en/getting-started/getting-started-with-android-apps.html#deploying-an-android-app-to-bitrise-io-53056). - - Next steps: - - Check out [Getting started with Android apps](https://devcenter.bitrise.io/en/getting-started/getting-started-with-android-apps.html) for signing and deployment options. - - [Set up code signing with *Android Sign* Step](https://devcenter.bitrise.io/en/code-signing/android-code-signing/android-code-signing-using-the-android-sign-step.html). + build_apk: + summary: Run your Android unit tests and create an APK file to install your app + on a device or share it with your team. + description: The workflow will first clone your Git repository, install Android + tools, set the project's version code based on the build number, run Android + lint and unit tests, build the project's APK file and save it. steps: - activate-ssh-key@%s: {} - git-clone@%s: {} @@ -162,12 +161,11 @@ configs: - sign-apk@%s: run_if: '{{getenv "BITRISEIO_ANDROID_KEYSTORE_URL" | ne ""}}' - deploy-to-bitrise-io@%s: {} - primary: - description: | - Runs tests. - - Next steps: - - Check out [Getting started with Android apps](https://devcenter.bitrise.io/en/getting-started/getting-started-with-android-apps.html). + run_tests: + summary: Run your Android unit tests and get the test report. + description: The workflow will first clone your Git repository, cache your Gradle + dependencies, install Android tools, run your Android unit tests and save the + test report. steps: - activate-ssh-key@%s: {} - git-clone@%s: {} @@ -195,9 +193,9 @@ errors_with_recommendations: - error: No known platform detected recommendations: DetailedError: - title: We couldn’t recognize your platform. + title: We couldn't recognize your platform. description: Our auto-configurator supports react-native, flutter, ionic, - cordova, ios, macos, android, fastlane projects. If you’re adding something + cordova, ios, macos, android, fastlane projects. If you're adding something else, skip this step and configure your Workflow manually. NoPlatformDetected: true warnings_with_recommendations: @@ -208,8 +206,8 @@ warnings_with_recommendations: that the right Gradle version is installed and used for the build. More info/guide: https://docs.gradle.org/current/userguide/gradle_wrapper.html recommendations: DetailedError: - title: We couldn’t find your Gradle Wrapper. Please make sure there is a gradlew - file in your project’s root directory. + title: We couldn't find your Gradle Wrapper. Please make sure there is a gradlew + file in your project's root directory. description: The Gradle Wrapper ensures that the right Gradle version is installed and used for the build. You can find out more about the Gradle Wrapper in the Gradle docs. @@ -272,13 +270,12 @@ configs: default_step_lib_source: https://github.com/bitrise-io/bitrise-steplib.git project_type: android workflows: - deploy: - description: | - Deploys app using [Deploy to bitrise.io Step](https://devcenter.bitrise.io/en/getting-started/getting-started-with-android-apps.html#deploying-an-android-app-to-bitrise-io-53056). - - Next steps: - - Check out [Getting started with Android apps](https://devcenter.bitrise.io/en/getting-started/getting-started-with-android-apps.html) for signing and deployment options. - - [Set up code signing with *Android Sign* Step](https://devcenter.bitrise.io/en/code-signing/android-code-signing/android-code-signing-using-the-android-sign-step.html). + build_apk: + summary: Run your Android unit tests and create an APK file to install your app + on a device or share it with your team. + description: The workflow will first clone your Git repository, install Android + tools, set the project's version code based on the build number, run Android + lint and unit tests, build the project's APK file and save it. steps: - activate-ssh-key@%s: {} - git-clone@%s: {} @@ -307,12 +304,11 @@ configs: - sign-apk@%s: run_if: '{{getenv "BITRISEIO_ANDROID_KEYSTORE_URL" | ne ""}}' - deploy-to-bitrise-io@%s: {} - primary: - description: | - Runs tests. - - Next steps: - - Check out [Getting started with Android apps](https://devcenter.bitrise.io/en/getting-started/getting-started-with-android-apps.html). + run_tests: + summary: Run your Android unit tests and get the test report. + description: The workflow will first clone your Git repository, cache your Gradle + dependencies, install Android tools, run your Android unit tests and save the + test report. steps: - activate-ssh-key@%s: {} - git-clone@%s: {} @@ -390,13 +386,12 @@ configs: default_step_lib_source: https://github.com/bitrise-io/bitrise-steplib.git project_type: android workflows: - deploy: - description: | - Deploys app using [Deploy to bitrise.io Step](https://devcenter.bitrise.io/en/getting-started/getting-started-with-android-apps.html#deploying-an-android-app-to-bitrise-io-53056). - - Next steps: - - Check out [Getting started with Android apps](https://devcenter.bitrise.io/en/getting-started/getting-started-with-android-apps.html) for signing and deployment options. - - [Set up code signing with *Android Sign* Step](https://devcenter.bitrise.io/en/code-signing/android-code-signing/android-code-signing-using-the-android-sign-step.html). + build_apk: + summary: Run your Android unit tests and create an APK file to install your app + on a device or share it with your team. + description: The workflow will first clone your Git repository, install Android + tools, set the project's version code based on the build number, run Android + lint and unit tests, build the project's APK file and save it. steps: - activate-ssh-key@%s: {} - git-clone@%s: {} @@ -425,12 +420,11 @@ configs: - sign-apk@%s: run_if: '{{getenv "BITRISEIO_ANDROID_KEYSTORE_URL" | ne ""}}' - deploy-to-bitrise-io@%s: {} - primary: - description: | - Runs tests. - - Next steps: - - Check out [Getting started with Android apps](https://devcenter.bitrise.io/en/getting-started/getting-started-with-android-apps.html). + run_tests: + summary: Run your Android unit tests and get the test report. + description: The workflow will first clone your Git repository, cache your Gradle + dependencies, install Android tools, run your Android unit tests and save the + test report. steps: - activate-ssh-key@%s: {} - git-clone@%s: {} @@ -488,13 +482,12 @@ configs: default_step_lib_source: https://github.com/bitrise-io/bitrise-steplib.git project_type: android workflows: - deploy: - description: | - Deploys app using [Deploy to bitrise.io Step](https://devcenter.bitrise.io/en/getting-started/getting-started-with-android-apps.html#deploying-an-android-app-to-bitrise-io-53056). - - Next steps: - - Check out [Getting started with Android apps](https://devcenter.bitrise.io/en/getting-started/getting-started-with-android-apps.html) for signing and deployment options. - - [Set up code signing with *Android Sign* Step](https://devcenter.bitrise.io/en/code-signing/android-code-signing/android-code-signing-using-the-android-sign-step.html). + build_apk: + summary: Run your Android unit tests and create an APK file to install your app + on a device or share it with your team. + description: The workflow will first clone your Git repository, install Android + tools, set the project's version code based on the build number, run Android + lint and unit tests, build the project's APK file and save it. steps: - activate-ssh-key@%s: {} - git-clone@%s: {} @@ -523,12 +516,11 @@ configs: - sign-apk@%s: run_if: '{{getenv "BITRISEIO_ANDROID_KEYSTORE_URL" | ne ""}}' - deploy-to-bitrise-io@%s: {} - primary: - description: | - Runs tests. - - Next steps: - - Check out [Getting started with Android apps](https://devcenter.bitrise.io/en/getting-started/getting-started-with-android-apps.html). + run_tests: + summary: Run your Android unit tests and get the test report. + description: The workflow will first clone your Git repository, cache your Gradle + dependencies, install Android tools, run your Android unit tests and save the + test report. steps: - activate-ssh-key@%s: {} - git-clone@%s: {} diff --git a/_tests/integration/fastlane_test.go b/_tests/integration/fastlane_test.go index 233155df..5cb819a6 100644 --- a/_tests/integration/fastlane_test.go +++ b/_tests/integration/fastlane_test.go @@ -132,15 +132,12 @@ configs: default_step_lib_source: https://github.com/bitrise-io/bitrise-steplib.git project_type: ios workflows: - deploy: - description: | - The workflow tests, builds and deploys the app using *Deploy to bitrise.io* step. - - For testing the *retry_on_failure* test repetition mode is enabled. - - Next steps: - - Set up [Connecting to an Apple service with API key](https://devcenter.bitrise.io/en/accounts/connecting-to-services/connecting-to-an-apple-service-with-api-key.html##). - - Or further customise code signing following our [iOS code signing](https://devcenter.bitrise.io/en/code-signing/ios-code-signing.html) guide. + archive_and_export_app: + summary: Run your Xcode tests and create an IPA file to install your app on a + device or share it with your team. + description: The workflow will first clone your Git repository, cache and install + your project's dependencies if any, run your Xcode tests, export an IPA file + from the project and save it. steps: - activate-ssh-key@%s: {} - git-clone@%s: {} @@ -158,12 +155,10 @@ configs: - automatic_code_signing: api-key - cache_level: none - deploy-to-bitrise-io@%s: {} - primary: - description: | - The workflow executes the tests. The *retry_on_failure* test repetition mode is enabled. - - Next steps: - - Check out [Getting started with iOS apps](https://devcenter.bitrise.io/en/getting-started/getting-started-with-ios-apps.html). + run_tests: + summary: Run your Xcode tests and get the test report. + description: The workflow will first clone your Git repository, cache and install + your project's dependencies if any, run your Xcode tests and save the test results. steps: - activate-ssh-key@%s: {} - git-clone@%s: {} diff --git a/_tests/integration/ios_test.go b/_tests/integration/ios_test.go index 30d60efd..83c98737 100644 --- a/_tests/integration/ios_test.go +++ b/_tests/integration/ios_test.go @@ -131,15 +131,12 @@ configs: default_step_lib_source: https://github.com/bitrise-io/bitrise-steplib.git project_type: ios workflows: - deploy: - description: | - The workflow tests, builds and deploys the app using *Deploy to bitrise.io* step. - - For testing the *retry_on_failure* test repetition mode is enabled. - - Next steps: - - Set up [Connecting to an Apple service with API key](https://devcenter.bitrise.io/en/accounts/connecting-to-services/connecting-to-an-apple-service-with-api-key.html##). - - Or further customise code signing following our [iOS code signing](https://devcenter.bitrise.io/en/code-signing/ios-code-signing.html) guide. + archive_and_export_app: + summary: Run your Xcode tests and create an IPA file to install your app on a + device or share it with your team. + description: The workflow will first clone your Git repository, cache and install + your project's dependencies if any, run your Xcode tests, export an IPA file + from the project and save it. steps: - activate-ssh-key@%s: {} - git-clone@%s: {} @@ -160,12 +157,10 @@ configs: - automatic_code_signing: api-key - cache_level: none - deploy-to-bitrise-io@%s: {} - primary: - description: | - The workflow executes the tests. The *retry_on_failure* test repetition mode is enabled. - - Next steps: - - Check out [Getting started with iOS apps](https://devcenter.bitrise.io/en/getting-started/getting-started-with-ios-apps.html). + run_tests: + summary: Run your Xcode tests and get the test report. + description: The workflow will first clone your Git repository, cache and install + your project's dependencies if any, run your Xcode tests and save the test results. steps: - activate-ssh-key@%s: {} - git-clone@%s: {} @@ -189,7 +184,7 @@ warnings_with_recommendations: Make sure to share your schemes for the expected behaviour. recommendations: DetailedError: - title: We couldn’t parse your project files. + title: We couldn't parse your project files. description: |- You can fix the problem and try again, or skip auto-configuration and set up your project manually. Our auto-configurator returned the following error: No shared schemes found for project: BitriseXcode7Sample.xcodeproj. @@ -257,15 +252,12 @@ configs: default_step_lib_source: https://github.com/bitrise-io/bitrise-steplib.git project_type: ios workflows: - deploy: - description: | - The workflow tests, builds and deploys the app using *Deploy to bitrise.io* step. - - For testing the *retry_on_failure* test repetition mode is enabled. - - Next steps: - - Set up [Connecting to an Apple service with API key](https://devcenter.bitrise.io/en/accounts/connecting-to-services/connecting-to-an-apple-service-with-api-key.html##). - - Or further customise code signing following our [iOS code signing](https://devcenter.bitrise.io/en/code-signing/ios-code-signing.html) guide. + archive_and_export_app: + summary: Run your Xcode tests and create an IPA file to install your app on a + device or share it with your team. + description: The workflow will first clone your Git repository, cache and install + your project's dependencies if any, run your Xcode tests, export an IPA file + from the project and save it. steps: - activate-ssh-key@%s: {} - git-clone@%s: {} @@ -286,12 +278,10 @@ configs: - automatic_code_signing: api-key - cache_level: none - deploy-to-bitrise-io@%s: {} - primary: - description: | - The workflow executes the tests. The *retry_on_failure* test repetition mode is enabled. - - Next steps: - - Check out [Getting started with iOS apps](https://devcenter.bitrise.io/en/getting-started/getting-started-with-ios-apps.html). + run_tests: + summary: Run your Xcode tests and get the test report. + description: The workflow will first clone your Git repository, cache and install + your project's dependencies if any, run your Xcode tests and save the test results. steps: - activate-ssh-key@%s: {} - git-clone@%s: {} @@ -448,15 +438,12 @@ configs: default_step_lib_source: https://github.com/bitrise-io/bitrise-steplib.git project_type: ios workflows: - deploy: - description: | - The workflow tests, builds and deploys the app using *Deploy to bitrise.io* step. - - For testing the *retry_on_failure* test repetition mode is enabled. - - Next steps: - - Set up [Connecting to an Apple service with API key](https://devcenter.bitrise.io/en/accounts/connecting-to-services/connecting-to-an-apple-service-with-api-key.html##). - - Or further customise code signing following our [iOS code signing](https://devcenter.bitrise.io/en/code-signing/ios-code-signing.html) guide. + archive_and_export_app: + summary: Create an IPA file to install your app on a device or share it with your + team. + description: The workflow will first clone your Git repository, cache and install + your project's dependencies if any, export an IPA file from the project and + save it. steps: - activate-ssh-key@%s: {} - git-clone@%s: {} @@ -468,12 +455,10 @@ configs: - automatic_code_signing: api-key - cache_level: none - deploy-to-bitrise-io@%s: {} - primary: - description: | - The workflow only builds the project because the project scanner could not find any tests. - - Next steps: - - Check out [Getting started with iOS apps](https://devcenter.bitrise.io/en/getting-started/getting-started-with-ios-apps.html). + build: + summary: Build your Xcode project. + description: The workflow will first clone your Git repository, cache and install + your project's dependencies if any and build your project. steps: - activate-ssh-key@%s: {} - git-clone@%s: {} @@ -489,15 +474,12 @@ configs: default_step_lib_source: https://github.com/bitrise-io/bitrise-steplib.git project_type: ios workflows: - deploy: - description: | - The workflow tests, builds and deploys the app using *Deploy to bitrise.io* step. - - For testing the *retry_on_failure* test repetition mode is enabled. - - Next steps: - - Set up [Connecting to an Apple service with API key](https://devcenter.bitrise.io/en/accounts/connecting-to-services/connecting-to-an-apple-service-with-api-key.html##). - - Or further customise code signing following our [iOS code signing](https://devcenter.bitrise.io/en/code-signing/ios-code-signing.html) guide. + archive_and_export_app: + summary: Run your Xcode tests and create an IPA file to install your app on a + device or share it with your team. + description: The workflow will first clone your Git repository, cache and install + your project's dependencies if any, run your Xcode tests, export an IPA file + from the project and save it. steps: - activate-ssh-key@%s: {} - git-clone@%s: {} @@ -515,12 +497,10 @@ configs: - automatic_code_signing: api-key - cache_level: none - deploy-to-bitrise-io@%s: {} - primary: - description: | - The workflow executes the tests. The *retry_on_failure* test repetition mode is enabled. - - Next steps: - - Check out [Getting started with iOS apps](https://devcenter.bitrise.io/en/getting-started/getting-started-with-ios-apps.html). + run_tests: + summary: Run your Xcode tests and get the test report. + description: The workflow will first clone your Git repository, cache and install + your project's dependencies if any, run your Xcode tests and save the test results. steps: - activate-ssh-key@%s: {} - git-clone@%s: {} @@ -597,15 +577,12 @@ configs: default_step_lib_source: https://github.com/bitrise-io/bitrise-steplib.git project_type: ios workflows: - deploy: - description: | - The workflow tests, builds and deploys the app using *Deploy to bitrise.io* step. - - For testing the *retry_on_failure* test repetition mode is enabled. - - Next steps: - - Set up [Connecting to an Apple service with API key](https://devcenter.bitrise.io/en/accounts/connecting-to-services/connecting-to-an-apple-service-with-api-key.html##). - - Or further customise code signing following our [iOS code signing](https://devcenter.bitrise.io/en/code-signing/ios-code-signing.html) guide. + archive_and_export_app: + summary: Run your Xcode tests and create an IPA file to install your app on a + device or share it with your team. + description: The workflow will first clone your Git repository, cache and install + your project's dependencies if any, run your Xcode tests, export an IPA file + from the project and save it. steps: - activate-ssh-key@%s: {} - git-clone@%s: {} @@ -626,12 +603,10 @@ configs: - automatic_code_signing: api-key - cache_level: none - deploy-to-bitrise-io@%s: {} - primary: - description: | - The workflow executes the tests. The *retry_on_failure* test repetition mode is enabled. - - Next steps: - - Check out [Getting started with iOS apps](https://devcenter.bitrise.io/en/getting-started/getting-started-with-ios-apps.html). + run_tests: + summary: Run your Xcode tests and get the test report. + description: The workflow will first clone your Git repository, cache and install + your project's dependencies if any, run your Xcode tests and save the test results. steps: - activate-ssh-key@%s: {} - git-clone@%s: {} @@ -751,15 +726,12 @@ configs: default_step_lib_source: https://github.com/bitrise-io/bitrise-steplib.git project_type: ios workflows: - deploy: - description: | - The workflow tests, builds and deploys the app using *Deploy to bitrise.io* step. - - For testing the *retry_on_failure* test repetition mode is enabled. - - Next steps: - - Set up [Connecting to an Apple service with API key](https://devcenter.bitrise.io/en/accounts/connecting-to-services/connecting-to-an-apple-service-with-api-key.html##). - - Or further customise code signing following our [iOS code signing](https://devcenter.bitrise.io/en/code-signing/ios-code-signing.html) guide. + archive_and_export_app: + summary: Create an IPA file to install your app on a device or share it with your + team. + description: The workflow will first clone your Git repository, cache and install + your project's dependencies if any, export an IPA file from the project and + save it. steps: - activate-ssh-key@%s: {} - git-clone@%s: {} @@ -778,12 +750,10 @@ configs: - distribution_method: $BITRISE_DISTRIBUTION_METHOD - automatic_code_signing: api-key - deploy-to-bitrise-io@%s: {} - primary: - description: | - The workflow only builds the project because the project scanner could not find any tests. - - Next steps: - - Check out [Getting started with iOS apps](https://devcenter.bitrise.io/en/getting-started/getting-started-with-ios-apps.html). + build: + summary: Build your Xcode project. + description: The workflow will first clone your Git repository, cache and install + your project's dependencies if any and build your project. steps: - activate-ssh-key@%s: {} - git-clone@%s: {} @@ -799,15 +769,12 @@ configs: default_step_lib_source: https://github.com/bitrise-io/bitrise-steplib.git project_type: ios workflows: - deploy: - description: | - The workflow tests, builds and deploys the app using *Deploy to bitrise.io* step. - - For testing the *retry_on_failure* test repetition mode is enabled. - - Next steps: - - Set up [Connecting to an Apple service with API key](https://devcenter.bitrise.io/en/accounts/connecting-to-services/connecting-to-an-apple-service-with-api-key.html##). - - Or further customise code signing following our [iOS code signing](https://devcenter.bitrise.io/en/code-signing/ios-code-signing.html) guide. + archive_and_export_app: + summary: Create an IPA file to install your app on a device or share it with your + team. + description: The workflow will first clone your Git repository, cache and install + your project's dependencies if any, export an IPA file from the project and + save it. steps: - activate-ssh-key@%s: {} - git-clone@%s: {} @@ -819,12 +786,10 @@ configs: - automatic_code_signing: api-key - cache_level: none - deploy-to-bitrise-io@%s: {} - primary: - description: | - The workflow only builds the project because the project scanner could not find any tests. - - Next steps: - - Check out [Getting started with iOS apps](https://devcenter.bitrise.io/en/getting-started/getting-started-with-ios-apps.html). + build: + summary: Build your Xcode project. + description: The workflow will first clone your Git repository, cache and install + your project's dependencies if any and build your project. steps: - activate-ssh-key@%s: {} - git-clone@%s: {} @@ -840,15 +805,12 @@ configs: default_step_lib_source: https://github.com/bitrise-io/bitrise-steplib.git project_type: ios workflows: - deploy: - description: | - The workflow tests, builds and deploys the app using *Deploy to bitrise.io* step. - - For testing the *retry_on_failure* test repetition mode is enabled. - - Next steps: - - Set up [Connecting to an Apple service with API key](https://devcenter.bitrise.io/en/accounts/connecting-to-services/connecting-to-an-apple-service-with-api-key.html##). - - Or further customise code signing following our [iOS code signing](https://devcenter.bitrise.io/en/code-signing/ios-code-signing.html) guide. + archive_and_export_app: + summary: Create an IPA file to install your app on a device or share it with your + team. + description: The workflow will first clone your Git repository, cache and install + your project's dependencies if any, export an IPA file from the project and + save it. steps: - activate-ssh-key@%s: {} - git-clone@%s: {} @@ -867,12 +829,10 @@ configs: - distribution_method: $BITRISE_DISTRIBUTION_METHOD - automatic_code_signing: api-key - deploy-to-bitrise-io@%s: {} - primary: - description: | - The workflow only builds the project because the project scanner could not find any tests. - - Next steps: - - Check out [Getting started with iOS apps](https://devcenter.bitrise.io/en/getting-started/getting-started-with-ios-apps.html). + build: + summary: Build your Xcode project. + description: The workflow will first clone your Git repository, cache and install + your project's dependencies if any and build your project. steps: - activate-ssh-key@%s: {} - git-clone@%s: {} @@ -888,15 +848,12 @@ configs: default_step_lib_source: https://github.com/bitrise-io/bitrise-steplib.git project_type: ios workflows: - deploy: - description: | - The workflow tests, builds and deploys the app using *Deploy to bitrise.io* step. - - For testing the *retry_on_failure* test repetition mode is enabled. - - Next steps: - - Set up [Connecting to an Apple service with API key](https://devcenter.bitrise.io/en/accounts/connecting-to-services/connecting-to-an-apple-service-with-api-key.html##). - - Or further customise code signing following our [iOS code signing](https://devcenter.bitrise.io/en/code-signing/ios-code-signing.html) guide. + archive_and_export_app: + summary: Create an IPA file to install your app on a device or share it with your + team. + description: The workflow will first clone your Git repository, cache and install + your project's dependencies if any, export an IPA file from the project and + save it. steps: - activate-ssh-key@%s: {} - git-clone@%s: {} @@ -908,12 +865,10 @@ configs: - automatic_code_signing: api-key - cache_level: none - deploy-to-bitrise-io@%s: {} - primary: - description: | - The workflow only builds the project because the project scanner could not find any tests. - - Next steps: - - Check out [Getting started with iOS apps](https://devcenter.bitrise.io/en/getting-started/getting-started-with-ios-apps.html). + build: + summary: Build your Xcode project. + description: The workflow will first clone your Git repository, cache and install + your project's dependencies if any and build your project. steps: - activate-ssh-key@%s: {} - git-clone@%s: {} @@ -1047,15 +1002,12 @@ configs: default_step_lib_source: https://github.com/bitrise-io/bitrise-steplib.git project_type: ios workflows: - deploy: - description: | - The workflow tests, builds and deploys the app using *Deploy to bitrise.io* step. - - For testing the *retry_on_failure* test repetition mode is enabled. - - Next steps: - - Set up [Connecting to an Apple service with API key](https://devcenter.bitrise.io/en/accounts/connecting-to-services/connecting-to-an-apple-service-with-api-key.html##). - - Or further customise code signing following our [iOS code signing](https://devcenter.bitrise.io/en/code-signing/ios-code-signing.html) guide. + archive_and_export_app: + summary: Run your Xcode tests and create an IPA file to install your app on a + device or share it with your team. + description: The workflow will first clone your Git repository, cache and install + your project's dependencies if any, run your Xcode tests, export an IPA file + from the project and save it. steps: - activate-ssh-key@%s: {} - git-clone@%s: {} @@ -1076,12 +1028,10 @@ configs: - automatic_code_signing: api-key - cache_level: none - deploy-to-bitrise-io@%s: {} - primary: - description: | - The workflow executes the tests. The *retry_on_failure* test repetition mode is enabled. - - Next steps: - - Check out [Getting started with iOS apps](https://devcenter.bitrise.io/en/getting-started/getting-started-with-ios-apps.html). + run_tests: + summary: Run your Xcode tests and get the test report. + description: The workflow will first clone your Git repository, cache and install + your project's dependencies if any, run your Xcode tests and save the test results. steps: - activate-ssh-key@%s: {} - git-clone@%s: {} @@ -1142,7 +1092,7 @@ warnings_with_recommendations: Make sure to share your schemes for the expected behaviour. recommendations: DetailedError: - title: We couldn’t parse your project files. + title: We couldn't parse your project files. description: |- You can fix the problem and try again, or skip auto-configuration and set up your project manually. Our auto-configurator returned the following error: No shared schemes found for project: Bitrise TODOs Sample.xcodeproj. @@ -1155,7 +1105,7 @@ warnings_with_recommendations: Make sure to share your schemes for the expected behaviour. recommendations: DetailedError: - title: We couldn’t parse your project files. + title: We couldn't parse your project files. description: |- You can fix the problem and try again, or skip auto-configuration and set up your project manually. Our auto-configurator returned the following error: No shared schemes found for project: Bitrise TODOs Sample.xcodeproj. @@ -1223,15 +1173,12 @@ configs: default_step_lib_source: https://github.com/bitrise-io/bitrise-steplib.git project_type: ios workflows: - deploy: - description: | - The workflow tests, builds and deploys the app using *Deploy to bitrise.io* step. - - For testing the *retry_on_failure* test repetition mode is enabled. - - Next steps: - - Set up [Connecting to an Apple service with API key](https://devcenter.bitrise.io/en/accounts/connecting-to-services/connecting-to-an-apple-service-with-api-key.html##). - - Or further customise code signing following our [iOS code signing](https://devcenter.bitrise.io/en/code-signing/ios-code-signing.html) guide. + archive_and_export_app: + summary: Run your Xcode tests and create an IPA file to install your app on a + device or share it with your team. + description: The workflow will first clone your Git repository, cache and install + your project's dependencies if any, run your Xcode tests, export an IPA file + from the project and save it. steps: - activate-ssh-key@%s: {} - git-clone@%s: {} @@ -1249,12 +1196,10 @@ configs: - automatic_code_signing: api-key - cache_level: none - deploy-to-bitrise-io@%s: {} - primary: - description: | - The workflow executes the tests. The *retry_on_failure* test repetition mode is enabled. - - Next steps: - - Check out [Getting started with iOS apps](https://devcenter.bitrise.io/en/getting-started/getting-started-with-ios-apps.html). + run_tests: + summary: Run your Xcode tests and get the test report. + description: The workflow will first clone your Git repository, cache and install + your project's dependencies if any, run your Xcode tests and save the test results. steps: - activate-ssh-key@%s: {} - git-clone@%s: {} @@ -1338,12 +1283,10 @@ configs: default_step_lib_source: https://github.com/bitrise-io/bitrise-steplib.git project_type: ios workflows: - primary: - description: | - The workflow executes the tests. The *retry_on_failure* test repetition mode is enabled. - - Next steps: - - Check out [Getting started with iOS apps](https://devcenter.bitrise.io/en/getting-started/getting-started-with-ios-apps.html). + run_tests: + summary: Run your Xcode tests and get the test report. + description: The workflow will first clone your Git repository, cache and install + your project's dependencies if any, run your Xcode tests and save the test results. steps: - activate-ssh-key@%s: {} - git-clone@%s: {} diff --git a/_tests/integration/mac_test.go b/_tests/integration/mac_test.go index 2ace98f4..71ed13f1 100644 --- a/_tests/integration/mac_test.go +++ b/_tests/integration/mac_test.go @@ -186,12 +186,10 @@ configs: default_step_lib_source: https://github.com/bitrise-io/bitrise-steplib.git project_type: ios workflows: - primary: - description: | - The workflow executes the tests. The *retry_on_failure* test repetition mode is enabled. - - Next steps: - - Check out [Getting started with iOS apps](https://devcenter.bitrise.io/en/getting-started/getting-started-with-ios-apps.html). + run_tests: + summary: Run your Xcode tests and get the test report. + description: The workflow will first clone your Git repository, cache and install + your project's dependencies if any, run your Xcode tests and save the test results. steps: - activate-ssh-key@%s: {} - git-clone@%s: {} diff --git a/_tests/integration/manual_config_test.go b/_tests/integration/manual_config_test.go index 7894e489..765e18d9 100644 --- a/_tests/integration/manual_config_test.go +++ b/_tests/integration/manual_config_test.go @@ -519,13 +519,12 @@ configs: default_step_lib_source: https://github.com/bitrise-io/bitrise-steplib.git project_type: android workflows: - deploy: - description: | - Deploys app using [Deploy to bitrise.io Step](https://devcenter.bitrise.io/en/getting-started/getting-started-with-android-apps.html#deploying-an-android-app-to-bitrise-io-53056). - - Next steps: - - Check out [Getting started with Android apps](https://devcenter.bitrise.io/en/getting-started/getting-started-with-android-apps.html) for signing and deployment options. - - [Set up code signing with *Android Sign* Step](https://devcenter.bitrise.io/en/code-signing/android-code-signing/android-code-signing-using-the-android-sign-step.html). + build_apk: + summary: Run your Android unit tests and create an APK file to install your app + on a device or share it with your team. + description: The workflow will first clone your Git repository, install Android + tools, set the project's version code based on the build number, run Android + lint and unit tests, build the project's APK file and save it. steps: - activate-ssh-key@%s: run_if: '{{getenv "SSH_RSA_PRIVATE_KEY" | ne ""}}' @@ -555,12 +554,11 @@ configs: - sign-apk@%s: run_if: '{{getenv "BITRISEIO_ANDROID_KEYSTORE_URL" | ne ""}}' - deploy-to-bitrise-io@%s: {} - primary: - description: | - Runs tests. - - Next steps: - - Check out [Getting started with Android apps](https://devcenter.bitrise.io/en/getting-started/getting-started-with-android-apps.html). + run_tests: + summary: Run your Android unit tests and get the test report. + description: The workflow will first clone your Git repository, cache your Gradle + dependencies, install Android tools, run your Android unit tests and save the + test report. steps: - activate-ssh-key@%s: run_if: '{{getenv "SSH_RSA_PRIVATE_KEY" | ne ""}}' @@ -830,15 +828,12 @@ configs: default_step_lib_source: https://github.com/bitrise-io/bitrise-steplib.git project_type: ios workflows: - deploy: - description: | - The workflow tests, builds and deploys the app using *Deploy to bitrise.io* step. - - For testing the *retry_on_failure* test repetition mode is enabled. - - Next steps: - - Set up [Connecting to an Apple service with API key](https://devcenter.bitrise.io/en/accounts/connecting-to-services/connecting-to-an-apple-service-with-api-key.html##). - - Or further customise code signing following our [iOS code signing](https://devcenter.bitrise.io/en/code-signing/ios-code-signing.html) guide. + archive_and_export_app: + summary: Run your Xcode tests and create an IPA file to install your app on a + device or share it with your team. + description: The workflow will first clone your Git repository, cache and install + your project's dependencies if any, run your Xcode tests, export an IPA file + from the project and save it. steps: - activate-ssh-key@%s: run_if: '{{getenv "SSH_RSA_PRIVATE_KEY" | ne ""}}' @@ -863,12 +858,10 @@ configs: - automatic_code_signing: api-key - cache_level: none - deploy-to-bitrise-io@%s: {} - primary: - description: | - The workflow executes the tests. The *retry_on_failure* test repetition mode is enabled. - - Next steps: - - Check out [Getting started with iOS apps](https://devcenter.bitrise.io/en/getting-started/getting-started-with-ios-apps.html). + run_tests: + summary: Run your Xcode tests and get the test report. + description: The workflow will first clone your Git repository, cache and install + your project's dependencies if any, run your Xcode tests and save the test results. steps: - activate-ssh-key@%s: run_if: '{{getenv "SSH_RSA_PRIVATE_KEY" | ne ""}}' diff --git a/models/configbuilder.go b/models/configbuilder.go index 675c96e9..7c59ba6b 100644 --- a/models/configbuilder.go +++ b/models/configbuilder.go @@ -1,8 +1,6 @@ package models import ( - "errors" - bitriseModels "github.com/bitrise-io/bitrise/models" envmanModels "github.com/bitrise-io/envman/models" ) @@ -30,9 +28,7 @@ type ConfigBuilderModel struct { // NewDefaultConfigBuilder ... func NewDefaultConfigBuilder() *ConfigBuilderModel { return &ConfigBuilderModel{ - workflowBuilderMap: map[WorkflowID]*workflowBuilderModel{ - PrimaryWorkflowID: newDefaultWorkflowBuilder(), - }, + workflowBuilderMap: map[WorkflowID]*workflowBuilderModel{}, } } @@ -56,13 +52,18 @@ func (builder *ConfigBuilderModel) SetWorkflowDescriptionTo(workflow WorkflowID, workflowBuilder.Description = description } -// Generate ... -func (builder *ConfigBuilderModel) Generate(projectType string, appEnvs ...envmanModels.EnvironmentItemModel) (bitriseModels.BitriseDataModel, error) { - primaryWorkflowBuilder, ok := builder.workflowBuilderMap[PrimaryWorkflowID] - if !ok || primaryWorkflowBuilder == nil || len(primaryWorkflowBuilder.Steps) == 0 { - return bitriseModels.BitriseDataModel{}, errors.New("primary workflow not defined") +// SetWorkflowSummaryTo ... +func (builder *ConfigBuilderModel) SetWorkflowSummaryTo(workflow WorkflowID, summary string) { + workflowBuilder := builder.workflowBuilderMap[workflow] + if workflowBuilder == nil { + workflowBuilder = newDefaultWorkflowBuilder() + builder.workflowBuilderMap[workflow] = workflowBuilder } + workflowBuilder.Summary = summary +} +// Generate ... +func (builder *ConfigBuilderModel) Generate(projectType string, appEnvs ...envmanModels.EnvironmentItemModel) (bitriseModels.BitriseDataModel, error) { workflows := map[string]bitriseModels.WorkflowModel{} for workflowID, workflowBuilder := range builder.workflowBuilderMap { workflows[string(workflowID)] = workflowBuilder.generate() diff --git a/models/workflowbuilder.go b/models/workflowbuilder.go index 7b5288fd..2a2470da 100644 --- a/models/workflowbuilder.go +++ b/models/workflowbuilder.go @@ -5,6 +5,7 @@ import bitriseModels "github.com/bitrise-io/bitrise/models" type workflowBuilderModel struct { Steps []bitriseModels.StepListItemModel Description string + Summary string } func newDefaultWorkflowBuilder() *workflowBuilderModel { @@ -21,5 +22,6 @@ func (builder *workflowBuilderModel) generate() bitriseModels.WorkflowModel { return bitriseModels.WorkflowModel{ Steps: builder.Steps, Description: builder.Description, + Summary: builder.Summary, } } diff --git a/scanner/config_test.go b/scanner/config_test.go index b4577783..f806a4ff 100644 --- a/scanner/config_test.go +++ b/scanner/config_test.go @@ -10,7 +10,7 @@ import ( ) var GradlewNotFoundRecommendation = errormapper.NewDetailedErrorRecommendation(errormapper.DetailedError{ - Title: "We couldn’t find your Gradle Wrapper. Please make sure there is a gradlew file in your project’s root directory.", + Title: "We couldn't find your Gradle Wrapper. Please make sure there is a gradlew file in your project's root directory.", Description: `The Gradle Wrapper ensures that the right Gradle version is installed and used for the build. You can find out more about the Gradle Wrapper in the Gradle docs.`, }) diff --git a/scanner/errors.go b/scanner/errors.go index d47dd1fc..1e9a6b5a 100644 --- a/scanner/errors.go +++ b/scanner/errors.go @@ -50,8 +50,8 @@ func newGenericDetail(errorMsg string) errormapper.DetailedError { func newNoPlatformDetectedGenericDetail() errormapper.DetailedError { return errormapper.DetailedError{ - Title: "We couldn’t recognize your platform.", - Description: fmt.Sprintf("Our auto-configurator supports %s projects. If you’re adding something else, skip this step and configure your Workflow manually.", strings.Join(availableScanners(), ", ")), + Title: "We couldn't recognize your platform.", + Description: fmt.Sprintf("Our auto-configurator supports %s projects. If you're adding something else, skip this step and configure your Workflow manually.", strings.Join(availableScanners(), ", ")), } } @@ -77,7 +77,7 @@ func newDetectPlatformFailedMatcher() *errormapper.PatternErrorMatcher { func newDetectPlatformFailedGenericDetail(errorMsg string) errormapper.DetailedError { return errormapper.DetailedError{ - Title: "We couldn’t parse your project files.", + Title: "We couldn't parse your project files.", Description: fmt.Sprintf("You can fix the problem and try again, or skip auto-configuration and set up your project manually. Our auto-configurator returned the following error:\n%s", errorMsg), } } @@ -98,7 +98,7 @@ var newOptionsFailedGenericDetail = newDetectPlatformFailedGenericDetail func newGradlewNotFoundDetail(errorMsg string, params ...string) errormapper.DetailedError { return errormapper.DetailedError{ - Title: "We couldn’t find your Gradle Wrapper. Please make sure there is a gradlew file in your project’s root directory.", + Title: "We couldn't find your Gradle Wrapper. Please make sure there is a gradlew file in your project's root directory.", Description: `The Gradle Wrapper ensures that the right Gradle version is installed and used for the build. You can find out more about the Gradle Wrapper in the Gradle docs.`, } } @@ -107,7 +107,7 @@ func newAppJSONIssueDetail(errorMsg string, params ...string) errormapper.Detail appJSONPath := params[0] entryName := params[1] return errormapper.DetailedError{ - Title: fmt.Sprintf("Your app.json file (%s) doesn’t have a %s field.", appJSONPath, entryName), + Title: fmt.Sprintf("Your app.json file (%s) doesn't have a %s field.", appJSONPath, entryName), Description: `The app.json file needs to contain the following entries: - name - displayName`, @@ -118,7 +118,7 @@ func newExpoAppJSONIssueDetail(errorMsg string, params ...string) errormapper.De appJSONPath := params[0] entryName := params[1] return errormapper.DetailedError{ - Title: fmt.Sprintf("Your app.json file (%s) doesn’t have a %s field.", appJSONPath, entryName), + Title: fmt.Sprintf("Your app.json file (%s) doesn't have a %s field.", appJSONPath, entryName), Description: `If your project uses Expo Kit, the app.json file needs to contain the following entries: - expo/name - expo/ios/bundleIdentifier @@ -128,7 +128,7 @@ func newExpoAppJSONIssueDetail(errorMsg string, params ...string) errormapper.De func newIonicCapacitorNotSupportedIssueDetail(errorMsg string, params ...string) errormapper.DetailedError { return errormapper.DetailedError{ - Title: "We couldn’t find your cordova.xml file.", - Description: `Our auto-configurator only supports Ionic projects with Cordova at the moment. If you’re trying to add a project with Ionic Capacitor, or something else, some Steps in your automatically generated Workflow might fail. To fix this, replace the failing Steps with script Steps in the Workflow editor later.`, + Title: "We couldn't find your cordova.xml file.", + Description: `Our auto-configurator only supports Ionic projects with Cordova at the moment. If you're trying to add a project with Ionic Capacitor, or something else, some Steps in your automatically generated Workflow might fail. To fix this, replace the failing Steps with script Steps in the Workflow editor later.`, } } diff --git a/scanner/errors_test.go b/scanner/errors_test.go index 8b8619cc..ac57dbc3 100644 --- a/scanner/errors_test.go +++ b/scanner/errors_test.go @@ -22,18 +22,18 @@ func Test_mapRecommendation(t *testing.T) { { name: "detectPlatformFailed generic error", args: args{tag: detectPlatformFailedTag, err: "No file found at path: Bitrise.xcodeproj/project.pbxproj"}, - want: errormapper.NewDetailedErrorRecommendation(errormapper.DetailedError{Title: "We couldn’t parse your project files.", Description: "You can fix the problem and try again, or skip auto-configuration and set up your project manually. Our auto-configurator returned the following error:\nNo file found at path: Bitrise.xcodeproj/project.pbxproj"}), + want: errormapper.NewDetailedErrorRecommendation(errormapper.DetailedError{Title: "We couldn't parse your project files.", Description: "You can fix the problem and try again, or skip auto-configuration and set up your project manually. Our auto-configurator returned the following error:\nNo file found at path: Bitrise.xcodeproj/project.pbxproj"}), }, { name: "optionsFailed generic error", args: args{tag: optionsFailedTag, err: "No file found at path: ios/App/App/package.json"}, - want: errormapper.NewDetailedErrorRecommendation(errormapper.DetailedError{Title: "We couldn’t parse your project files.", Description: "You can fix the problem and try again, or skip auto-configuration and set up your project manually. Our auto-configurator returned the following error:\nNo file found at path: ios/App/App/package.json"}), + want: errormapper.NewDetailedErrorRecommendation(errormapper.DetailedError{Title: "We couldn't parse your project files.", Description: "You can fix the problem and try again, or skip auto-configuration and set up your project manually. Our auto-configurator returned the following error:\nNo file found at path: ios/App/App/package.json"}), }, { name: "detectPlatformFailed gradlew error", args: args{tag: detectPlatformFailedTag, err: `No Gradle Wrapper (gradlew) found. Using a Gradle Wrapper (gradlew) is required, as the wrapper is what makes sure that the right Gradle version is installed and used for the build. More info/guide: https://docs.gradle.org/current/userguide/gradle_wrapper.html`}, - want: errormapper.NewDetailedErrorRecommendation(errormapper.DetailedError{Title: "We couldn’t find your Gradle Wrapper. Please make sure there is a gradlew file in your project’s root directory.", Description: `The Gradle Wrapper ensures that the right Gradle version is installed and used for the build. You can find out more about the Gradle Wrapper in the Gradle docs.`}), + want: errormapper.NewDetailedErrorRecommendation(errormapper.DetailedError{Title: "We couldn't find your Gradle Wrapper. Please make sure there is a gradlew file in your project's root directory.", Description: `The Gradle Wrapper ensures that the right Gradle version is installed and used for the build. You can find out more about the Gradle Wrapper in the Gradle docs.`}), }, { name: "optionsFailed app.json error", @@ -42,7 +42,7 @@ The app.json file needs to contain: - name - displayName entries.`}, - want: errormapper.NewDetailedErrorRecommendation(errormapper.DetailedError{Title: "Your app.json file (bitrise/app.json) doesn’t have a name field.", Description: `The app.json file needs to contain the following entries: + want: errormapper.NewDetailedErrorRecommendation(errormapper.DetailedError{Title: "Your app.json file (bitrise/app.json) doesn't have a name field.", Description: `The app.json file needs to contain the following entries: - name - displayName`}), }, @@ -54,7 +54,7 @@ If the project uses Expo Kit the app.json file needs to contain: - expo/ios/bundleIdentifier - expo/android/package - entries.`}, - want: errormapper.NewDetailedErrorRecommendation(errormapper.DetailedError{Title: "Your app.json file (app.json) doesn’t have a expo/ios/bundleIdentifier field.", Description: `If your project uses Expo Kit, the app.json file needs to contain the following entries: + want: errormapper.NewDetailedErrorRecommendation(errormapper.DetailedError{Title: "Your app.json file (app.json) doesn't have a expo/ios/bundleIdentifier field.", Description: `If your project uses Expo Kit, the app.json file needs to contain the following entries: - expo/name - expo/ios/bundleIdentifier - expo/android/package`}), diff --git a/scanners/android/android.go b/scanners/android/android.go index 0de65300..43db8516 100644 --- a/scanners/android/android.go +++ b/scanners/android/android.go @@ -1,14 +1,49 @@ package android import ( - "fmt" "path/filepath" "gopkg.in/yaml.v2" - "github.com/bitrise-io/bitrise-init/analytics" "github.com/bitrise-io/bitrise-init/models" - "github.com/bitrise-io/go-utils/log" + "github.com/bitrise-io/bitrise-init/steps" + envmanModels "github.com/bitrise-io/envman/models" +) + +const ( + ScannerName = "android" + ConfigName = "android-config" + DefaultConfigName = "default-android-config" + + testsWorkflowID = "run_tests" + testsWorkflowSummary = "Run your Android unit tests and get the test report." + testWorkflowDescription = "The workflow will first clone your Git repository, cache your Gradle dependencies, install Android tools, run your Android unit tests and save the test report." + + buildWorkflowID = "build_apk" + buildWorkflowSummary = "Run your Android unit tests and create an APK file to install your app on a device or share it with your team." + buildWorkflowDescription = "The workflow will first clone your Git repository, install Android tools, set the project's version code based on the build number, run Android lint and unit tests, build the project's APK file and save it." + + ProjectLocationInputKey = "project_location" + ProjectLocationInputEnvKey = "PROJECT_LOCATION" + ProjectLocationInputTitle = "The root directory of an Android project" + ProjectLocationInputSummary = "The root directory of your Android project, stored as an Environment Variable. In your Workflows, you can specify paths relative to this path. You can change this at any time." + + ModuleBuildGradlePathInputKey = "build_gradle_path" + + VariantInputKey = "variant" + VariantInputEnvKey = "VARIANT" + VariantInputTitle = "Variant" + VariantInputSummary = "Your Android build variant. You can add variants at any time, as well as further configure your existing variants later." + + ModuleInputKey = "module" + ModuleInputEnvKey = "MODULE" + ModuleInputTitle = "Module" + ModuleInputSummary = "Modules provide a container for your Android project's source code, resource files, and app level settings, such as the module-level build file and Android manifest file. Each module can be independently built, tested, and debugged. You can add new modules to your Bitrise builds at any time." + + GradlewPathInputKey = "gradlew_path" + + CacheLevelInputKey = "cache_level" + CacheLevelNone = "none" ) // Scanner ... @@ -22,12 +57,12 @@ func NewScanner() *Scanner { } // Name ... -func (Scanner) Name() string { +func (scanner *Scanner) Name() string { return ScannerName } // ExcludedScannerNames ... -func (*Scanner) ExcludedScannerNames() []string { +func (scanner *Scanner) ExcludedScannerNames() []string { return nil } @@ -40,95 +75,6 @@ func (scanner *Scanner) DetectPlatform(searchDir string) (_ bool, err error) { return detected, err } -func detect(searchDir string) ([]Project, error) { - projectFiles := fileGroups{ - {"build.gradle", "build.gradle.kts"}, - {"settings.gradle", "settings.gradle.kts"}, - } - skipDirs := []string{".git", "CordovaLib", "node_modules"} - - log.TInfof("Searching for android files") - - projectRoots, err := walkMultipleFileGroups(searchDir, projectFiles, skipDirs) - if err != nil { - return nil, fmt.Errorf("failed to search for build.gradle files, error: %s", err) - } - - log.TPrintf("%d android files detected", len(projectRoots)) - for _, file := range projectRoots { - log.TPrintf("- %s", file) - } - - if len(projectRoots) == 0 { - return nil, nil - } - log.TSuccessf("Platform detected") - - projects, err := parseProjects(searchDir, projectRoots) - if err != nil { - return nil, err - } - - return projects, nil -} - -func parseProjects(searchDir string, projectRoots []string) ([]Project, error) { - var ( - lastErr error - projects []Project - ) - - for _, projectRoot := range projectRoots { - var warnings models.Warnings - - log.TInfof("Investigating Android project: %s", projectRoot) - - exists, err := containsLocalProperties(projectRoot) - if err != nil { - lastErr = err - log.TWarnf("%s", err) - - continue - } - if exists { - containsLocalPropertiesWarning := fmt.Sprintf("the local.properties file should NOT be checked into Version Control Systems, as it contains information specific to your local configuration, the location of the file is: %s", filepath.Join(projectRoot, "local.properties")) - warnings = []string{containsLocalPropertiesWarning} - } - - if err := checkGradlew(projectRoot); err != nil { - lastErr = err - log.TWarnf("%s", err) - - continue - } - - relProjectRoot, err := filepath.Rel(searchDir, projectRoot) - if err != nil { - lastErr = err - log.TWarnf("%s", err) - - continue - } - - icons, err := LookupIcons(projectRoot, searchDir) - if err != nil { - analytics.LogInfo("android-icon-lookup", analytics.DetectorErrorData("android", err), "Failed to lookup android icon") - } - - projects = append(projects, Project{ - RelPath: relProjectRoot, - Icons: icons, - Warnings: warnings, - }) - } - - if len(projects) == 0 { - return []Project{}, lastErr - } - - return projects, nil -} - // Options ... func (scanner *Scanner) Options() (models.OptionNode, models.Warnings, models.Icons, error) { projectLocationOption := models.NewOption(ProjectLocationInputTitle, ProjectLocationInputSummary, ProjectLocationInputEnvKey, models.TypeSelector) @@ -207,3 +153,89 @@ func (scanner *Scanner) DefaultConfigs() (models.BitriseConfigMap, error) { DefaultConfigName: string(data), }, nil } + +func (scanner *Scanner) generateConfigBuilder(repoAccess models.RepoAccess) models.ConfigBuilderModel { + configBuilder := models.NewDefaultConfigBuilder() + + projectLocationEnv, gradlewPath, moduleEnv, variantEnv := "$"+ProjectLocationInputEnvKey, "$"+ProjectLocationInputEnvKey+"/gradlew", "$"+ModuleInputEnvKey, "$"+VariantInputEnvKey + + //-- test + configBuilder.AppendStepListItemsTo(testsWorkflowID, steps.DefaultPrepareStepList(steps.PrepareListParams{ + RepoAccess: repoAccess})...) + configBuilder.AppendStepListItemsTo(testsWorkflowID, steps.RestoreGradleCache()) + configBuilder.AppendStepListItemsTo(testsWorkflowID, steps.InstallMissingAndroidToolsStepListItem( + envmanModels.EnvironmentItemModel{GradlewPathInputKey: gradlewPath}, + )) + configBuilder.AppendStepListItemsTo(testsWorkflowID, steps.AndroidUnitTestStepListItem( + envmanModels.EnvironmentItemModel{ + ProjectLocationInputKey: projectLocationEnv, + }, + envmanModels.EnvironmentItemModel{ + VariantInputKey: variantEnv, + }, + envmanModels.EnvironmentItemModel{ + CacheLevelInputKey: CacheLevelNone, + }, + )) + configBuilder.AppendStepListItemsTo(testsWorkflowID, steps.SaveGradleCache()) + configBuilder.AppendStepListItemsTo(testsWorkflowID, steps.DefaultDeployStepList()...) + configBuilder.SetWorkflowSummaryTo(testsWorkflowID, testsWorkflowSummary) + configBuilder.SetWorkflowDescriptionTo(testsWorkflowID, testWorkflowDescription) + + //-- build + configBuilder.AppendStepListItemsTo(buildWorkflowID, steps.DefaultPrepareStepList(steps.PrepareListParams{ + RepoAccess: repoAccess, + })...) + configBuilder.AppendStepListItemsTo(buildWorkflowID, steps.InstallMissingAndroidToolsStepListItem( + envmanModels.EnvironmentItemModel{GradlewPathInputKey: gradlewPath}, + )) + + configBuilder.AppendStepListItemsTo(buildWorkflowID, steps.ChangeAndroidVersionCodeAndVersionNameStepListItem( + envmanModels.EnvironmentItemModel{ModuleBuildGradlePathInputKey: filepath.Join(projectLocationEnv, moduleEnv, "build.gradle")}, + )) + + configBuilder.AppendStepListItemsTo(buildWorkflowID, steps.AndroidLintStepListItem( + envmanModels.EnvironmentItemModel{ + ProjectLocationInputKey: projectLocationEnv, + }, + envmanModels.EnvironmentItemModel{ + VariantInputKey: variantEnv, + }, + envmanModels.EnvironmentItemModel{ + CacheLevelInputKey: CacheLevelNone, + }, + )) + configBuilder.AppendStepListItemsTo(buildWorkflowID, steps.AndroidUnitTestStepListItem( + envmanModels.EnvironmentItemModel{ + ProjectLocationInputKey: projectLocationEnv, + }, + envmanModels.EnvironmentItemModel{ + VariantInputKey: variantEnv, + }, + envmanModels.EnvironmentItemModel{ + CacheLevelInputKey: CacheLevelNone, + }, + )) + + configBuilder.AppendStepListItemsTo(buildWorkflowID, steps.AndroidBuildStepListItem( + envmanModels.EnvironmentItemModel{ + ProjectLocationInputKey: projectLocationEnv, + }, + envmanModels.EnvironmentItemModel{ + ModuleInputKey: moduleEnv, + }, + envmanModels.EnvironmentItemModel{ + VariantInputKey: variantEnv, + }, + envmanModels.EnvironmentItemModel{ + CacheLevelInputKey: CacheLevelNone, + }, + )) + configBuilder.AppendStepListItemsTo(buildWorkflowID, steps.SignAPKStepListItem()) + configBuilder.AppendStepListItemsTo(buildWorkflowID, steps.DefaultDeployStepList()...) + + configBuilder.SetWorkflowDescriptionTo(buildWorkflowID, buildWorkflowDescription) + configBuilder.SetWorkflowSummaryTo(buildWorkflowID, buildWorkflowSummary) + + return *configBuilder +} diff --git a/scanners/android/const.go b/scanners/android/const.go deleted file mode 100644 index 0cc8df5e..00000000 --- a/scanners/android/const.go +++ /dev/null @@ -1,16 +0,0 @@ -package android - -const ( - primaryWorkflowDescription = `Runs tests. - -Next steps: -- Check out [Getting started with Android apps](https://devcenter.bitrise.io/en/getting-started/getting-started-with-android-apps.html). -` - - deployWorkflowDescription = `Deploys app using [Deploy to bitrise.io Step](https://devcenter.bitrise.io/en/getting-started/getting-started-with-android-apps.html#deploying-an-android-app-to-bitrise-io-53056). - -Next steps: -- Check out [Getting started with Android apps](https://devcenter.bitrise.io/en/getting-started/getting-started-with-android-apps.html) for signing and deployment options. -- [Set up code signing with *Android Sign* Step](https://devcenter.bitrise.io/en/code-signing/android-code-signing/android-code-signing-using-the-android-sign-step.html). -` -) diff --git a/scanners/android/utility.go b/scanners/android/utility.go index c74d949d..af88cea7 100644 --- a/scanners/android/utility.go +++ b/scanners/android/utility.go @@ -2,12 +2,14 @@ package android import ( "errors" + "fmt" "os" "path/filepath" + "github.com/bitrise-io/bitrise-init/analytics" + "github.com/bitrise-io/bitrise-init/models" - "github.com/bitrise-io/bitrise-init/steps" - envmanModels "github.com/bitrise-io/envman/models" + "github.com/bitrise-io/go-utils/log" "github.com/bitrise-io/go-utils/pathutil" ) @@ -16,40 +18,100 @@ type fileGroups [][]string var pathUtilIsPathExists = pathutil.IsPathExists var filePathWalk = filepath.Walk -// Constants ... -const ( - ScannerName = "android" - ConfigName = "android-config" - DefaultConfigName = "default-android-config" +// Project is an Android project on the filesystem +type Project struct { + RelPath string + Icons models.Icons + Warnings models.Warnings +} - ProjectLocationInputKey = "project_location" - ProjectLocationInputEnvKey = "PROJECT_LOCATION" - ProjectLocationInputTitle = "The root directory of an Android project" - ProjectLocationInputSummary = "The root directory of your Android project, stored as an Environment Variable. In your Workflows, you can specify paths relative to this path. You can change this at any time." +func detect(searchDir string) ([]Project, error) { + projectFiles := fileGroups{ + {"build.gradle", "build.gradle.kts"}, + {"settings.gradle", "settings.gradle.kts"}, + } + skipDirs := []string{".git", "CordovaLib", "node_modules"} - ModuleBuildGradlePathInputKey = "build_gradle_path" + log.TInfof("Searching for android files") - VariantInputKey = "variant" - VariantInputEnvKey = "VARIANT" - VariantInputTitle = "Variant" - VariantInputSummary = "Your Android build variant. You can add variants at any time, as well as further configure your existing variants later." + projectRoots, err := walkMultipleFileGroups(searchDir, projectFiles, skipDirs) + if err != nil { + return nil, fmt.Errorf("failed to search for build.gradle files, error: %s", err) + } - ModuleInputKey = "module" - ModuleInputEnvKey = "MODULE" - ModuleInputTitle = "Module" - ModuleInputSummary = "Modules provide a container for your Android project's source code, resource files, and app level settings, such as the module-level build file and Android manifest file. Each module can be independently built, tested, and debugged. You can add new modules to your Bitrise builds at any time." + log.TPrintf("%d android files detected", len(projectRoots)) + for _, file := range projectRoots { + log.TPrintf("- %s", file) + } - GradlewPathInputKey = "gradlew_path" + if len(projectRoots) == 0 { + return nil, nil + } + log.TSuccessf("Platform detected") - CacheLevelInputKey = "cache_level" - CacheLevelNone = "none" -) + projects, err := parseProjects(searchDir, projectRoots) + if err != nil { + return nil, err + } -// Project is an Android project on the filesystem -type Project struct { - RelPath string - Icons models.Icons - Warnings models.Warnings + return projects, nil +} + +func parseProjects(searchDir string, projectRoots []string) ([]Project, error) { + var ( + lastErr error + projects []Project + ) + + for _, projectRoot := range projectRoots { + var warnings models.Warnings + + log.TInfof("Investigating Android project: %s", projectRoot) + + exists, err := containsLocalProperties(projectRoot) + if err != nil { + lastErr = err + log.TWarnf("%s", err) + + continue + } + if exists { + containsLocalPropertiesWarning := fmt.Sprintf("the local.properties file should NOT be checked into Version Control Systems, as it contains information specific to your local configuration, the location of the file is: %s", filepath.Join(projectRoot, "local.properties")) + warnings = []string{containsLocalPropertiesWarning} + } + + if err := checkGradlew(projectRoot); err != nil { + lastErr = err + log.TWarnf("%s", err) + + continue + } + + relProjectRoot, err := filepath.Rel(searchDir, projectRoot) + if err != nil { + lastErr = err + log.TWarnf("%s", err) + + continue + } + + icons, err := LookupIcons(projectRoot, searchDir) + if err != nil { + analytics.LogInfo("android-icon-lookup", analytics.DetectorErrorData("android", err), "Failed to lookup android icon") + } + + projects = append(projects, Project{ + RelPath: relProjectRoot, + Icons: icons, + Warnings: warnings, + }) + } + + if len(projects) == 0 { + return []Project{}, lastErr + } + + return projects, nil } func walk(src string, fn func(path string, info os.FileInfo) error) error { @@ -140,87 +202,3 @@ that the right Gradle version is installed and used for the build. More info/gui } return nil } - -func (scanner *Scanner) generateConfigBuilder(repoAccess models.RepoAccess) models.ConfigBuilderModel { - configBuilder := models.NewDefaultConfigBuilder() - - projectLocationEnv, gradlewPath, moduleEnv, variantEnv := "$"+ProjectLocationInputEnvKey, "$"+ProjectLocationInputEnvKey+"/gradlew", "$"+ModuleInputEnvKey, "$"+VariantInputEnvKey - - //-- primary - configBuilder.AppendStepListItemsTo(models.PrimaryWorkflowID, steps.DefaultPrepareStepList(steps.PrepareListParams{ - RepoAccess: repoAccess})...) - configBuilder.AppendStepListItemsTo(models.PrimaryWorkflowID, steps.RestoreGradleCache()) - configBuilder.AppendStepListItemsTo(models.PrimaryWorkflowID, steps.InstallMissingAndroidToolsStepListItem( - envmanModels.EnvironmentItemModel{GradlewPathInputKey: gradlewPath}, - )) - configBuilder.AppendStepListItemsTo(models.PrimaryWorkflowID, steps.AndroidUnitTestStepListItem( - envmanModels.EnvironmentItemModel{ - ProjectLocationInputKey: projectLocationEnv, - }, - envmanModels.EnvironmentItemModel{ - VariantInputKey: variantEnv, - }, - envmanModels.EnvironmentItemModel{ - CacheLevelInputKey: CacheLevelNone, - }, - )) - configBuilder.AppendStepListItemsTo(models.PrimaryWorkflowID, steps.SaveGradleCache()) - configBuilder.AppendStepListItemsTo(models.PrimaryWorkflowID, steps.DefaultDeployStepList()...) - configBuilder.SetWorkflowDescriptionTo(models.PrimaryWorkflowID, primaryWorkflowDescription) - - //-- deploy - configBuilder.AppendStepListItemsTo(models.DeployWorkflowID, steps.DefaultPrepareStepList(steps.PrepareListParams{ - RepoAccess: repoAccess, - })...) - configBuilder.AppendStepListItemsTo(models.DeployWorkflowID, steps.InstallMissingAndroidToolsStepListItem( - envmanModels.EnvironmentItemModel{GradlewPathInputKey: gradlewPath}, - )) - - configBuilder.AppendStepListItemsTo(models.DeployWorkflowID, steps.ChangeAndroidVersionCodeAndVersionNameStepListItem( - envmanModels.EnvironmentItemModel{ModuleBuildGradlePathInputKey: filepath.Join(projectLocationEnv, moduleEnv, "build.gradle")}, - )) - - configBuilder.AppendStepListItemsTo(models.DeployWorkflowID, steps.AndroidLintStepListItem( - envmanModels.EnvironmentItemModel{ - ProjectLocationInputKey: projectLocationEnv, - }, - envmanModels.EnvironmentItemModel{ - VariantInputKey: variantEnv, - }, - envmanModels.EnvironmentItemModel{ - CacheLevelInputKey: CacheLevelNone, - }, - )) - configBuilder.AppendStepListItemsTo(models.DeployWorkflowID, steps.AndroidUnitTestStepListItem( - envmanModels.EnvironmentItemModel{ - ProjectLocationInputKey: projectLocationEnv, - }, - envmanModels.EnvironmentItemModel{ - VariantInputKey: variantEnv, - }, - envmanModels.EnvironmentItemModel{ - CacheLevelInputKey: CacheLevelNone, - }, - )) - - configBuilder.AppendStepListItemsTo(models.DeployWorkflowID, steps.AndroidBuildStepListItem( - envmanModels.EnvironmentItemModel{ - ProjectLocationInputKey: projectLocationEnv, - }, - envmanModels.EnvironmentItemModel{ - ModuleInputKey: moduleEnv, - }, - envmanModels.EnvironmentItemModel{ - VariantInputKey: variantEnv, - }, - envmanModels.EnvironmentItemModel{ - CacheLevelInputKey: CacheLevelNone, - }, - )) - configBuilder.AppendStepListItemsTo(models.DeployWorkflowID, steps.SignAPKStepListItem()) - configBuilder.AppendStepListItemsTo(models.DeployWorkflowID, steps.DefaultDeployStepList()...) - - configBuilder.SetWorkflowDescriptionTo(models.DeployWorkflowID, deployWorkflowDescription) - - return *configBuilder -} diff --git a/scanners/ios/ios.go b/scanners/ios/ios.go index f64b8423..e8ac5fc7 100644 --- a/scanners/ios/ios.go +++ b/scanners/ios/ios.go @@ -24,7 +24,7 @@ func NewScanner() *Scanner { } // Name ... -func (Scanner) Name() string { +func (scanner *Scanner) Name() string { return string(XcodeProjectTypeIOS) } @@ -48,7 +48,7 @@ func (scanner *Scanner) DetectPlatform(searchDir string) (bool, error) { } // ExcludedScannerNames ... -func (Scanner) ExcludedScannerNames() []string { +func (scanner *Scanner) ExcludedScannerNames() []string { return []string{} } @@ -65,7 +65,7 @@ func (scanner *Scanner) Options() (models.OptionNode, models.Warnings, models.Ic } // DefaultOptions ... -func (Scanner) DefaultOptions() models.OptionNode { +func (scanner *Scanner) DefaultOptions() models.OptionNode { return GenerateDefaultOptions(XcodeProjectTypeIOS) } @@ -74,11 +74,11 @@ func (scanner *Scanner) Configs(repoAccess models.RepoAccess) (models.BitriseCon } // DefaultConfigs ... -func (Scanner) DefaultConfigs() (models.BitriseConfigMap, error) { +func (scanner *Scanner) DefaultConfigs() (models.BitriseConfigMap, error) { return GenerateDefaultConfig(XcodeProjectTypeIOS) } // GetProjectType returns the project_type property used in a bitrise config -func (Scanner) GetProjectType() string { +func (scanner *Scanner) GetProjectType() string { return string(XcodeProjectTypeIOS) } diff --git a/scanners/ios/utility.go b/scanners/ios/utility.go index eca6a068..70c293c2 100644 --- a/scanners/ios/utility.go +++ b/scanners/ios/utility.go @@ -614,7 +614,7 @@ func GenerateConfigBuilder( exportMethod: exportMethod, } - createPrimaryWorkflow(params) + createVerificationWorkflow(params) if !isSPMProject { createDeployWorkflow(params) diff --git a/scanners/ios/workflow.go b/scanners/ios/workflow.go index ab1e6489..0b0e69be 100644 --- a/scanners/ios/workflow.go +++ b/scanners/ios/workflow.go @@ -15,24 +15,29 @@ const ( AutomaticCodeSigningValue = "api-key" CacheLevelKey = "cache_level" CacheLevelNone = "none" -) -const primaryTestDescription = `The workflow executes the tests. The *retry_on_failure* test repetition mode is enabled.` + // test workflow + primaryWorkflowID = "primary" + + testWorkflowID = "run_tests" + testWorkflowSummary = "Run your Xcode tests and get the test report." + testWorkflowDescription = "The workflow will first clone your Git repository, cache and install your project's dependencies if any, run your Xcode tests and save the test results." -const primaryBuildOnlyDescription = `The workflow only builds the project because the project scanner could not find any tests.` + buildWorkflowID = "build" + buildWorkflowSummary = "Build your Xcode project." + buildWorkflowDescription = "The workflow will first clone your Git repository, cache and install your project's dependencies if any and build your project." -const primaryCommonDescription = `Next steps: -- Check out [Getting started with iOS apps](https://devcenter.bitrise.io/en/getting-started/getting-started-with-ios-apps.html). -` + // deploy workflow + deployWorkflowID = "deploy" -const deployDescription = `The workflow tests, builds and deploys the app using *Deploy to bitrise.io* step. + archiveAndExportWorkflowID = "archive_and_export_app" -For testing the *retry_on_failure* test repetition mode is enabled. + archiveAndExportWorkflowWithTestsSummary = "Run your Xcode tests and create an IPA file to install your app on a device or share it with your team." + archiveAndExportWorkflowWithTestsDescription = "The workflow will first clone your Git repository, cache and install your project's dependencies if any, run your Xcode tests, export an IPA file from the project and save it." -Next steps: -- Set up [Connecting to an Apple service with API key](https://devcenter.bitrise.io/en/accounts/connecting-to-services/connecting-to-an-apple-service-with-api-key.html##). -- Or further customise code signing following our [iOS code signing](https://devcenter.bitrise.io/en/code-signing/ios-code-signing.html) guide. -` + archiveAndExportWorkflowWithoutTestsSummary = "Create an IPA file to install your app on a device or share it with your team." + archiveAndExportWorkflowWithoutTestsDescription = "The workflow will first clone your Git repository, cache and install your project's dependencies if any, export an IPA file from the project and save it." +) type workflowSetupParams struct { projectType XcodeProjectType @@ -47,36 +52,83 @@ type workflowSetupParams struct { exportMethod string } -func createPrimaryWorkflow(params workflowSetupParams) { - identifier := models.PrimaryWorkflowID - addSharedSetupSteps(identifier, params, false, true) +func createVerificationWorkflow(params workflowSetupParams) { + id, summary, description := verificationWorkflowIDSummaryAndDescription(params.projectType, params.hasTests) - var description string + addSharedSetupSteps(models.WorkflowID(id), params, false, true) if params.hasTests { - description = primaryTestDescription - addTestStep(identifier, params.configBuilder, params.projectType) + addTestStep(models.WorkflowID(id), params.configBuilder, params.projectType) } else { - description = primaryBuildOnlyDescription - addBuildStep(identifier, params.configBuilder, params.projectType) + addBuildStep(models.WorkflowID(id), params.configBuilder, params.projectType) } - addSharedTeardownSteps(identifier, params, true) - addDescription(params.projectType, identifier, params.configBuilder, description+"\n\n"+primaryCommonDescription) + addSharedTeardownSteps(models.WorkflowID(id), params, true) + addSummary(models.WorkflowID(id), params.configBuilder, summary) + addDescription(models.WorkflowID(id), params.configBuilder, description) } func createDeployWorkflow(params workflowSetupParams) { - identifier := models.DeployWorkflowID + id, summary, description := deployWorkflowIDSummaryAndDescription(params.projectType, params.hasTests) + includeCertificateAndProfileInstallStep := params.projectType == XcodeProjectTypeMacOS - addSharedSetupSteps(identifier, params, includeCertificateAndProfileInstallStep, false) + addSharedSetupSteps(models.WorkflowID(id), params, includeCertificateAndProfileInstallStep, false) if params.hasTests { - addTestStep(identifier, params.configBuilder, params.projectType) + addTestStep(models.WorkflowID(id), params.configBuilder, params.projectType) + } + + addArchiveStep(models.WorkflowID(id), params.configBuilder, params.projectType, params.hasAppClip, params.exportMethod) + addSharedTeardownSteps(models.WorkflowID(id), params, false) // No cache in deploy workflows + addSummary(models.WorkflowID(id), params.configBuilder, summary) + addDescription(models.WorkflowID(id), params.configBuilder, description) +} + +func verificationWorkflowIDSummaryAndDescription(projectType XcodeProjectType, hasTests bool) (string, string, string) { + var id string + var summary string + var description string + + if projectType == XcodeProjectTypeMacOS { + id = primaryWorkflowID + summary = "" + description = "" + } else { + if hasTests { + id = testWorkflowID + summary = testWorkflowSummary + description = testWorkflowDescription + } else { + id = buildWorkflowID + summary = buildWorkflowSummary + description = buildWorkflowDescription + } } - addArchiveStep(identifier, params.configBuilder, params.projectType, params.hasAppClip, params.exportMethod) - addSharedTeardownSteps(identifier, params, false) // No cache in deploy workflows - addDescription(params.projectType, identifier, params.configBuilder, deployDescription) + return id, summary, description +} + +func deployWorkflowIDSummaryAndDescription(projectType XcodeProjectType, hasTests bool) (string, string, string) { + var id string + var summary string + var description string + + if projectType == XcodeProjectTypeMacOS { + id = deployWorkflowID + summary = "" + description = "" + } else { + id = archiveAndExportWorkflowID + if hasTests { + summary = archiveAndExportWorkflowWithTestsSummary + description = archiveAndExportWorkflowWithTestsDescription + } else { + summary = archiveAndExportWorkflowWithoutTestsSummary + description = archiveAndExportWorkflowWithoutTestsDescription + } + } + + return id, summary, description } // Add steps @@ -167,14 +219,14 @@ func addSharedTeardownSteps(workflow models.WorkflowID, params workflowSetupPara params.configBuilder.AppendStepListItemsTo(workflow, steps.DefaultDeployStepList()...) } -func addDescription(projectType XcodeProjectType, workflow models.WorkflowID, configBuilder *models.ConfigBuilderModel, description string) { - if projectType != XcodeProjectTypeIOS { - return - } - +func addDescription(workflow models.WorkflowID, configBuilder *models.ConfigBuilderModel, description string) { configBuilder.SetWorkflowDescriptionTo(workflow, description) } +func addSummary(workflow models.WorkflowID, configBuilder *models.ConfigBuilderModel, summary string) { + configBuilder.SetWorkflowSummaryTo(workflow, summary) +} + // Helpers func baseXcodeStepInputModels() []envmanModels.EnvironmentItemModel {