-
Notifications
You must be signed in to change notification settings - Fork 8
/
Copy pathbitrise.yml
111 lines (102 loc) · 3.22 KB
/
bitrise.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
format_version: 5
default_step_lib_source: https://github.com/bitrise-io/bitrise-steplib.git
app:
envs:
- BITRISE_STEP_GIT_CLONE_URL: https://github.com/bitrise-steplib/steps-expo-detach.git
- ORIGIN_SOURCE_DIR: $BITRISE_SOURCE_DIR
- SAMPLE_APP_URL: https://github.com/bitrise-samples/react-native-expo.git
- BRANCH: "SDK39"
- ANDROIDMANIFEST_PATH: "$ORIGIN_SOURCE_DIR/_tmp/android/app/src/main/AndroidManifest.xml"
- EXPO_UPDATE_URL_KEY: "expo.modules.updates.EXPO_UPDATE_URL"
workflows:
test:
before_run:
- audit-this-step
steps:
- go-list:
- golint:
- errcheck:
- go-test:
after_run:
- test-eject
test-eject:
before_run:
- _clear_workdir
after_run:
- validate-output
steps:
- script:
title: Clone sample app
inputs:
- content: git clone $SAMPLE_APP_URL . -b $BRANCH && cd
title: Install node modules for the Expo project
inputs:
- command: install
- path::./:
title: Step Test
run_if: true
inputs:
- project_path: $BITRISE_SOURCE_DIR
- expo_cli_verson: "latest"
- override_react_native_version: 0.61.0
- user_name: $USER_NAME
- password: $PASSWORD
validate-output:
title: Validate output
steps:
- script:
title: Validate that expo.modules.updates.EXPO_UPDATE_URL is present in AndroidManifest.xml
inputs:
- content: |-
#!/bin/bash
set -ex
if ! grep -q $EXPO_UPDATE_URL_KEY $ANDROIDMANIFEST_PATH; then
echo "$EXPO_UPDATE_URL_KEY is not found in $ANDROIDMANIFEST_PATH"
exit 1
fi
_clear_workdir:
steps:
- script:
inputs:
- content: |-
#!/bin/bash
set -ex
cd ${ORIGIN_SOURCE_DIR}
rm -rf "./_tmp"
mkdir "_tmp"
- change-workdir:
title: Switch working dir to test / _tmp dir
description: |-
To prevent Step testing issues, like referencing relative
files with just './some-file' in the Step's code, which would
work for testing the step from this directory directly
but would break if the step is included in another `bitrise.yml`.
run_if: true
inputs:
- path: ${ORIGIN_SOURCE_DIR}/_tmp
- is_create_path: true
dep-update:
title: Dep update
description: |
Used for updating bitrise dependencies with dep
steps:
- script:
title: Dependency update
inputs:
- content: |-
#!/bin/bash
set -ex
go get -u -v github.com/golang/dep/cmd/dep
dep ensure -v
dep ensure -v -update
# ----------------------------------------------------------------
# --- workflows to Share this step into a Step Library
audit-this-step:
steps:
- script:
inputs:
- content: |-
#!/bin/bash
set -ex
stepman audit --step-yml ./step.yml