Skip to content

Commit

Permalink
Tool 1218/bare (#8)
Browse files Browse the repository at this point in the history
* change plain eject-method to bare

* remove the expo-cli 2.0.0 checks

* clean
  • Loading branch information
BirmacherAkos authored and trapacska committed Oct 15, 2019
1 parent daaa787 commit 6294e34
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 53 deletions.
49 changes: 4 additions & 45 deletions bitrise.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ app:

- ORIGIN_SOURCE_DIR: $BITRISE_SOURCE_DIR
- SAMPLE_APP_URL: https://github.com/bitrise-samples/react-native-expo.git
- BRANCH: "SDK_34"

# Define it in .bitrise.secrets.yml
- USER_NAME: $USER_NAME
Expand All @@ -22,19 +23,17 @@ workflows:
- errcheck:
- go-test:
after_run:
- plain
- bare
- expo_kit
- plain_2_0_0
- expo_kit_2_0_0

plain:
bare:
before_run:
- _clear_workdir
steps:
- script:
title: Clone sample app
inputs:
- content: git clone $SAMPLE_APP_URL . && cd
- content: git clone $SAMPLE_APP_URL . -b $BRANCH && cd
- [email protected]:
title: Install node modules for the expo project
inputs:
Expand All @@ -46,25 +45,6 @@ workflows:
- project_path: $BITRISE_SOURCE_DIR
- expo_cli_verson: "latest"
- override_react_native_version: 0.55.4

plain_2_0_0:
before_run:
- _clear_workdir
steps:
- script:
title: Clone sample app
inputs:
- content: git clone $SAMPLE_APP_URL . && cd
- [email protected]:
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: "2.0.0"

expo_kit:
before_run:
Expand All @@ -87,27 +67,6 @@ workflows:
- user_name: $USER_NAME
- password: $PASSWORD

expo_kit_2_0_0:
before_run:
- _clear_workdir
steps:
- script:
title: Clone sample app
inputs:
- content: git clone -b expo_sdk $SAMPLE_APP_URL . && cd
- [email protected]:
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: "2.0.0"
- user_name: $USER_NAME
- password: $PASSWORD

_clear_workdir:
envs:
steps:
Expand Down
10 changes: 5 additions & 5 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,12 +26,12 @@ type Config struct {
OverrideReactNativeVersion string `env:"override_react_native_version"`
}

// EjectMethod if the project is using Expo SDK and you choose the "plain" --eject-method those imports will stop working.
// EjectMethod if the project is using Expo SDK and you choose the "bare" --eject-method those imports will stop working.
type EjectMethod string

// const ...
const (
Plain EjectMethod = "plain"
Bare EjectMethod = "bare"
ExpoKit EjectMethod = "expoKit"
)

Expand Down Expand Up @@ -169,7 +169,7 @@ func main() {

//
// Select the --eject-method
ejectMethod := Plain
ejectMethod := Bare
fmt.Println()
log.Infof("Define --eject-method")
{
Expand Down Expand Up @@ -207,8 +207,8 @@ func main() {
if err := e.login(cfg.UserName, cfg.Password); err != nil {
failf("Failed to log in to your provided Expo account, error: %s", err)
}
case Plain:
log.Printf("--eject-method has been set to plain => Skip...")
case Bare:
log.Printf("--eject-method has been set to bare => Skip...")
}
}

Expand Down
6 changes: 3 additions & 3 deletions step.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ inputs:
A couple of examples:
* "2.0.0"
* "3.0.0"
* latest
is_required: "true"
- user_name: ""
Expand All @@ -52,7 +52,7 @@ inputs:
the `user_name` and `password` inputs are __required__.
If you provide these inputs the step will run: `expo eject --eject-method expoKit`,
otherwise: `expo eject --eject-method plain`.
otherwise: `expo eject --eject-method bare`.
**NOTE:** You need to use your username and not your e-mail address.
- password: ""
Expand All @@ -66,7 +66,7 @@ inputs:
the `user_name` and `password` inputs are __required__.
If you provide these inputs the step will run: `expo eject --eject-method expoKit`,
otherwise: `expo eject --eject-method plain`.
otherwise: `expo eject --eject-method bare`.
is_sensitive: true
- run_publish: "no"
opts:
Expand Down

0 comments on commit 6294e34

Please sign in to comment.