Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
101 changes: 2 additions & 99 deletions bitrise.yml
Original file line number Diff line number Diff line change
@@ -1,19 +1,12 @@
format_version: 1.0.0
format_version: "11"
default_step_lib_source: https://github.com/bitrise-io/bitrise-steplib.git

app:
envs:
- ORIG_BITRISE_SOURCE_DIR: $BITRISE_SOURCE_DIR

workflows:
ci:
check:
before_run:
- test
- swiftpm_cache

test:
after_run:
- integration-test
steps:
- git::https://github.com/bitrise-steplib/steps-check.git:
title: Lint
Expand All @@ -24,93 +17,3 @@ workflows:
inputs:
- exclude: "*/mocks"
- go-test: { }

integration-test:
steps:
- script:
title: Run integration tests
inputs:
- content: |-
#!/bin/bash
echo "Running integration tests ..."
set -ex

go test -v ./_tests/integration/...

_swiftpm_step:
envs:
- CURRENT_PROJECT_PATH: $CURRENT_PROJECT_PATH
- BITRISE_ACCESS_TOKEN: $BITRISE_ACCESS_TOKEN
steps:
- build-router-start:
inputs:
- workflows: swiftpm_run_xcodebuild
- wait_for_builds: "true"
- access_token: $BITRISE_ACCESS_TOKEN
- environment_key_list: CURRENT_PROJECT_PATH
- verbose: "yes"

swiftpm_run_xcodebuild:
envs:
- CURRENT_PROJECT_PATH: $CURRENT_PROJECT_PATH
- SAMPLES_DIR: $ORIG_BITRISE_SOURCE_DIR/_checkout
steps:
- script:
title: Cleanup $TMP_DIR
inputs:
- content: |
#!/bin/bash
set -ex

rm -rf $SAMPLES_DIR
mkdir $SAMPLES_DIR
git clone https://github.com/bitrise-io/sample-apps-ios-swiftpm.git -b master $SAMPLES_DIR

rm -rf /Users/lpusok/Library/Developer/Xcode/DerivedData/*
- cache-pull:
run_if: true
inputs:
- is_debug_mode: true
- xcode-test:
title: Run xcodebuild
inputs:
- project_path: $SAMPLES_DIR/$CURRENT_PROJECT_PATH/sample-swiftpm2.xcodeproj
- scheme: sample-swiftpm2
- cache_level: swift_packages
- cache-push:
title: Push cache
run_if: true
is_skippable: false
inputs:
- is_debug_mode: true

_swiftpm_step2:
envs:
- CURRENT_PROJECT_PATH: sample-swiftpm2
after_run:
- _swiftpm_step

_swiftpm_step3:
envs:
- CURRENT_PROJECT_PATH: sample-swiftpm3
after_run:
- _swiftpm_step

_swiftpm_step5:
envs:
- CURRENT_PROJECT_PATH: sample-swiftpm5
after_run:
- _swiftpm_step

_swiftpm_step7:
envs:
- CURRENT_PROJECT_PATH: sample-swiftpm7
after_run:
- _swiftpm_step

swiftpm_cache:
after_run:
- _swiftpm_step2
- _swiftpm_step3
- _swiftpm_step5
- _swiftpm_step7
13 changes: 10 additions & 3 deletions exportoptions/appstore_options.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,14 +22,17 @@ type AppStoreOptionsModel struct {
UploadSymbols bool
// Should Xcode manage the app's build number when uploading to App Store Connect? Defaults to YES.
ManageAppVersion bool

TestFlightInternalTestingOnly bool
}

// NewAppStoreOptions ...
func NewAppStoreOptions() AppStoreOptionsModel {
return AppStoreOptionsModel{
UploadBitcode: UploadBitcodeDefault,
UploadSymbols: UploadSymbolsDefault,
ManageAppVersion: manageAppVersionDefault,
UploadBitcode: UploadBitcodeDefault,
UploadSymbols: UploadSymbolsDefault,
ManageAppVersion: manageAppVersionDefault,
TestFlightInternalTestingOnly: TestFlightInternalTestingOnlyDefault,
}
}

Expand Down Expand Up @@ -73,6 +76,10 @@ func (options AppStoreOptionsModel) Hash() map[string]interface{} {
if options.Destination != "" {
hash[DestinationKey] = options.Destination
}
//nolint:gosimple
if options.TestFlightInternalTestingOnly != TestFlightInternalTestingOnlyDefault {
hash[TestFlightInternalTestingOnlyKey] = options.TestFlightInternalTestingOnly
}
return hash
}

Expand Down
9 changes: 8 additions & 1 deletion exportoptions/exportoptions_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,7 @@ func TestNewAppStoreOptions(t *testing.T) {
options := NewAppStoreOptions()
require.Equal(t, UploadBitcodeDefault, options.UploadBitcode)
require.Equal(t, UploadSymbolsDefault, options.UploadSymbols)
require.Equal(t, TestFlightInternalTestingOnlyDefault, options.TestFlightInternalTestingOnly)
}
}

Expand All @@ -136,9 +137,10 @@ func TestAppStoreOptionsToHash(t *testing.T) {
options.UploadBitcode = false
options.UploadSymbols = false
options.ManageAppVersion = false
options.TestFlightInternalTestingOnly = true

hash := options.Hash()
require.Equal(t, 5, len(hash))
require.Equal(t, 6, len(hash))

{
value, ok := hash[MethodKey]
Expand All @@ -165,6 +167,11 @@ func TestAppStoreOptionsToHash(t *testing.T) {
require.True(t, ok)
require.Equal(t, false, value)
}
{
value, ok := hash[TestFlightInternalTestingOnlyKey]
require.True(t, ok)
require.Equal(t, true, value)
}
}
}

Expand Down
3 changes: 3 additions & 0 deletions exportoptions/properties.go
Original file line number Diff line number Diff line change
Expand Up @@ -177,6 +177,9 @@ const (

const DestinationKey = "destination"

const TestFlightInternalTestingOnlyDefault = false
const TestFlightInternalTestingOnlyKey = "testFlightInternalTestingOnly"

type Destination string

// Destination ...
Expand Down