Skip to content
This repository has been archived by the owner on Dec 20, 2021. It is now read-only.

Commit

Permalink
feat: Add custom build command to build android
Browse files Browse the repository at this point in the history
  • Loading branch information
kotielnikov committed Jan 18, 2021
1 parent 33ffc6b commit fc9ced9
Show file tree
Hide file tree
Showing 9 changed files with 2,023 additions and 1,460 deletions.
8 changes: 5 additions & 3 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
version: 2.1

orbs:
cli: circleci/[email protected].2
cli: circleci/[email protected].8
orb-tools: circleci/orb-tools@2

jobs:
Expand Down Expand Up @@ -49,7 +49,9 @@ jobs:
echo 'github.com ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAQEAq2A7hRGmdnm9tUDbO9IDSwBK6TbQa+PXYPCPy6rbTrTtw7PHkccKrpp0yVhp5HdEIcKr6pLlVDBfOLX9QUsyCOV0wzfjIJNlGEYsdlLJizHhbn2mUjvSAHQqZETYP81eFzLQNnPHt4EVVUh7VfDESU84KezmD5QlWpXLmvU31/yMf+Se8xhHTvKSCZIFImWwoG6mbUoWf9nzpIoaSjB+weqqUUmpaaasXVal72J+UX2B+2RPW3RcT0eOzQgqlJL3RKrTJvdsjE3JEAvGq3lGHSZXy28G3skua2SmVi/w4yCE6gbODqnTWlg7+wC604ydGXA8VJiS5ap43JXiUFFAaQ==' >> ~/.ssh/known_hosts
- run:
name: Publish to CircleCI Orb Registry
command: yarn semantic-release
command: |
cat package.json
yarn semantic-release
workflows:
btd:
Expand All @@ -58,7 +60,7 @@ workflows:

- orb-tools/publish:
orb-path: packed-orb.yml
orb-ref: "react-native-community/react-native@dev:${CIRCLE_BRANCH}"
orb-ref: "capmo/react-native@dev:${CIRCLE_BRANCH}"
publish-token-variable: CIRCLECI_API_TOKEN
attach-workspace: true
checkout: false
Expand Down
2 changes: 1 addition & 1 deletion .releaserc
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
"semantic-release-circleci-orb",
{
"commandName": "/home/circleci/circleci",
"orbName": "react-native-community/react-native",
"orbName": "capmo/react-native",
"orbPath": "packed-orb.yml"
}
],
Expand Down
16 changes: 8 additions & 8 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"name": "@react-native-community/circleci-orb",
"name": "@capmo/circleci-orb",
"version": "4.4.2",
"private": true,
"description": "A CircleCI Orb which can be used to simplify building and testing React Native apps.",
Expand All @@ -8,19 +8,19 @@
"semantic-release": "semantic-release"
},
"devDependencies": {
"@semantic-release/changelog": "^3.0.2",
"@semantic-release/git": "^7.0.8",
"semantic-release": "^15.13.3",
"@semantic-release/changelog": "^5.0.1",
"@semantic-release/git": "^9.0.0",
"semantic-release": "^17.3.3",
"semantic-release-circleci-orb": "^1.1.1"
},
"repository": {
"type": "git",
"url": "https://github.com/react-native-community/react-native-circleci-orb.git"
"url": "https://github.com/capmo/react-native-circleci-orb.git"
},
"author": "Matt Oakes <[email protected]>",
"license": "MIT",
"bugs": {
"url": "https://github.com/react-native-community/react-native-circleci-orb/issues"
"url": "https://github.com/capmo/react-native-circleci-orb/issues"
},
"homepage": "https://github.com/react-native-community/react-native-circleci-orb#readme"
}
"homepage": "https://github.com/capmo/react-native-circleci-orb#readme"
}
2 changes: 1 addition & 1 deletion src/@orb.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
version: 2.1
description: |
Orb for building and testing React Native projects. View
this orb's source: https://github.com/react-native-community/react-native-circleci-orb
this orb's source: https://github.com/capmo/react-native-circleci-orb
7 changes: 6 additions & 1 deletion src/commands/android_build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,11 @@ parameters:
description: The build type to build. This is normally either "debug" or "release" but you may have custom build types configured for your app.
type: string
default: "debug"
build_command:
description: Custom build command
type: string
default: "cd <<parameters.project_path>> && chmod +x gradlew && ./gradlew --build-cache --max-workers 2 --continue assemble<<parameters.build_type>> assembleAndroidTest -DtestBuildType=<<parameters.build_type>> --stacktrace"


steps:
- run:
Expand Down Expand Up @@ -59,7 +64,7 @@ steps:

- run:
name: Build Android APK
command: "cd <<parameters.project_path>> && chmod +x gradlew && ./gradlew --build-cache --max-workers 2 --continue assemble<<parameters.build_type>> assembleAndroidTest -DtestBuildType=<<parameters.build_type>> --stacktrace"
command: <<parameters.build_command>>

- run:
name: Collecting Gradle Build caches for saving
Expand Down
2 changes: 1 addition & 1 deletion src/examples/android.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ usage:

# Make sure you use the latest version of the Orb
orbs:
rn: react-native-community/[email protected]
rn: capmo/[email protected]

# Custom jobs which are not part of the Orb
jobs:
Expand Down
2 changes: 1 addition & 1 deletion src/examples/full.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ usage:

# Make sure you use the latest version of the Orb
orbs:
rn: react-native-community/[email protected]
rn: capmo/[email protected]

# Custom jobs which are not part of the Orb
jobs:
Expand Down
2 changes: 1 addition & 1 deletion src/examples/ios.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ usage:

# Make sure you use the latest version of the Orb
orbs:
rn: react-native-community/[email protected]
rn: capmo/[email protected]

# Custom jobs which are not part of the Orb
jobs:
Expand Down
Loading

0 comments on commit fc9ced9

Please sign in to comment.