Skip to content

[MOB-11441] Add CodePush Support #877

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 25 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
ec1f130
[MOB-12033] Restructure `native` Directory (#933)
a7medev Mar 2, 2023
0f48f89
[MOB-9962] Migrate to `NativeEventEmitter` (#924)
a7medev Mar 2, 2023
102ddc3
[MOB-12043] Remove Android Module Dead Code (#884)
TheBuggedYRN Mar 5, 2023
752b924
[MOB-11997] Replace CLI `dir` flag with `file` (#937)
TheBuggedYRN Mar 8, 2023
06d364c
[MOB-12070] Disable Sorucemaps Scripts on CI (#940)
TheBuggedYRN Mar 12, 2023
a282b40
Run probot-stale only on issues (#941)
DavidMina96 Mar 13, 2023
07309e4
[MOB-12143] Use `circleci/ruby` Image for Danger (#944)
TheBuggedYRN Mar 14, 2023
0067537
[MOB-12052] Use Shallow Checkout in CI (#943)
TheBuggedYRN Mar 14, 2023
007a3bb
[MOB-12050] Cache CI Pods (#945)
TheBuggedYRN Mar 15, 2023
d8003a8
[MOB-12180] Remove Redundant CI Steps (#947)
TheBuggedYRN Mar 16, 2023
cb0d389
[MOB-12053] Use `node` CI Orb (#946)
TheBuggedYRN Mar 20, 2023
74ed172
[MOB-12204] Upgrade macOS Resource Class to Gen2
a7medev Mar 20, 2023
b2d01a7
[MOB-12207] Fix CLI Typos (#952)
TheBuggedYRN Mar 22, 2023
c8acb16
[MOB-12202] Create `examples` directory (#951)
DavidMina96 Mar 22, 2023
9f86df5
Add `codePushLabel` to `InstabugConfig` and `init`
DavidMina96 Jan 2, 2023
2fdbba4
Add `codePushLabel` to `init` on Android
DavidMina96 Jan 2, 2023
04cf2c5
Use Android snapshot
DavidMina96 Jan 2, 2023
070164d
Add `setCodePushVersion` mapping on iOS
DavidMina96 Jan 2, 2023
470f19a
Use iOS Custom Build
DavidMina96 Jan 2, 2023
61f228e
Add `codePushLabel` property to `init` test
DavidMina96 Jan 2, 2023
231216c
Add `setCodePushVersion` test on iOS
DavidMina96 Jan 2, 2023
dd2dd99
Update CHANGELOG.md
DavidMina96 Jan 2, 2023
69a7898
Increase `init` test coverage
DavidMina96 Jan 3, 2023
bbb7a95
Update `init` after rebase
DavidMina96 Mar 22, 2023
231fb5c
Fix `init` params order
DavidMina96 Mar 28, 2023
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
224 changes: 103 additions & 121 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
@@ -1,23 +1,45 @@
version: 2.1

orbs:
android: circleci/[email protected]
advanced-checkout: vsco/[email protected]
node: circleci/[email protected]

commands:
install_pods:
parameters:
working_directory:
type: string
steps:
- restore_cache:
name: Restore Pods Cache
keys:
- v1-pods-{{ checksum "<< parameters.working_directory >>/Podfile.lock" }}
- run:
name: Install Pods
working_directory: << parameters.working_directory >>
command: pod install --deployment
- save_cache:
name: Save Pods Cache
key: v1-pods-{{ checksum "<< parameters.working_directory >>/Podfile.lock" }}
paths:
- << parameters.working_directory >>/Pods
jobs:
danger:
docker:
- image: dantoml/danger:latest
- image: circleci/ruby:2.6.4
steps:
- checkout
- run: danger
- advanced-checkout/shallow-checkout
- run: bundle install
- run: bundle exec danger

lint:
working_directory: ~/project
docker:
- image: cimg/node:16.17.1
executor:
name: node/default
steps:
- checkout
- run:
name: Install Node Packages
command: yarn
- advanced-checkout/shallow-checkout
- node/install-packages:
pkg-manager: yarn
- run:
name: Check Format
command: yarn format
Expand All @@ -26,62 +48,35 @@ jobs:
command: yarn lint:ci

test_module:
working_directory: ~/project
docker:
- image: cimg/node:16.17.1
executor:
name: node/default
steps:
- checkout:
path: ~/project

- advanced-checkout/shallow-checkout
- node/install-packages:
pkg-manager: yarn
- run:
name: Install Node Packages
command: yarn

- run:
name: jest tests
command: |
mkdir -p test-results/jest
yarn run test
environment:
JEST_JUNIT_OUTPUT: test-results/jest/junit.xml

- persist_to_workspace:
root: ~/project
paths:
- node_modules

- store_test_results:
path: test-results

- store_artifacts:
path: test-results
name: Run Tests
command: yarn test

test_android:
executor:
name: android/android-machine
tag: '2022.03.1'
working_directory: ~/project
working_directory: ~/project/examples/default
steps:
- checkout:
path: ~/project
- run:
name: Install Yarn
command: npm install -g yarn
- run:
name: Install Node Packages
working_directory: example
command: yarn
- advanced-checkout/shallow-checkout
- node/install-yarn
- node/install-packages:
pkg-manager: yarn
- android/run-tests:
working-directory: ./example/android
test-command: ./gradlew test
working-directory: android
test-command: ./gradlew test -PinstabugUploadEnable=false

validate_shell_files:
machine:
image: ubuntu-2004:current
working_directory: ~/project
steps:
- checkout:
path: ~/project
- advanced-checkout/shallow-checkout
- run:
name: Validate Android Script
command: bash -n android/upload_sourcemap.sh
Expand All @@ -95,34 +90,30 @@ jobs:
sync_generated_files:
macos:
xcode: 13.4.1
working_directory: ~/project
steps:
- checkout
- run: yarn
- run: cd example && yarn
- run: cd example/ios && pod install
- advanced-checkout/shallow-checkout
- node/install-packages:
pkg-manager: yarn
- node/install-packages:
pkg-manager: yarn
app-dir: examples/default
- install_pods:
working_directory: examples/default/ios
- run: git --no-pager diff
- run: git diff-index HEAD --exit-code -p -I EXCLUDED_ARCHS # Ignore Arch Changes

test_ios:
macos:
xcode: 13.4.1
working_directory: ~/project/example
working_directory: ~/project/examples/default
environment:
FL_OUTPUT_DIR: output
INSTABUG_SOURCEMAPS_UPLOAD_DISABLE: true
steps:
- checkout:
path: ~/project
- run:
name: Install CocoaPods
command: sudo gem install cocoapods
- run:
name: Install node_modules
command: yarn
- run:
name: Install Pods
- advanced-checkout/shallow-checkout
- node/install-packages:
pkg-manager: yarn
- install_pods:
working_directory: ios
command: pod install
- run:
name: Build and run tests
working_directory: ios
Expand All @@ -134,7 +125,6 @@ jobs:
-sdk iphonesimulator \
-destination 'platform=iOS Simulator,name=iPhone 13 Pro Max,OS=15.5' \
test | xcpretty
no_output_timeout: 30m
- run:
name: Convert xcresult into JSON report
working_directory: ios/coverage
Expand All @@ -150,71 +140,53 @@ jobs:
e2e_ios:
macos:
xcode: 13.4.1
resource_class: large
working_directory: ~/project
resource_class: macos.x86.medium.gen2
environment:
FL_OUTPUT_DIR: output
INSTABUG_SOURCEMAPS_UPLOAD_DISABLE: true
steps:
- checkout
- run:
name: Install CocoaPods
command: sudo gem install cocoapods
- run:
name: Install React Native CLI
command: npm install -g react-native-cli
- advanced-checkout/shallow-checkout
- node/install-packages:
pkg-manager: yarn
- node/install-packages:
pkg-manager: yarn
app-dir: examples/default
- install_pods:
working_directory: examples/default/ios
- run:
name: Install Detox CLI
command: npm install -g detox-cli
- run:
name: Install Detox Utils
command: brew tap wix/brew && brew install applesimutils
- run:
name: Install Node Packages
command: yarn
- run:
name: Build Project
command: yarn build:lib
- run:
name: Install Example's Node Packages
working_directory: example
command: yarn
- run:
name: Install Pods
working_directory: example/ios
command: pod install
name: Rebuild Detox.framework Cache
working_directory: examples/default
command: detox clean-framework-cache && detox build-framework-cache
- run:
name: Detox - Build Release App
working_directory: example
working_directory: examples/default
command: detox build --configuration ios.sim.release --cleanup
- run:
name: Detox - Run E2E Tests
working_directory: example
working_directory: examples/default
command: detox test --configuration ios.sim.release --cleanup

e2e_android:
executor:
name: android/android-machine
tag: 2022.03.1
resource-class: large
working_directory: ~/project
steps:
- checkout
- run:
name: Install Yarn
command: npm install --global yarn
- advanced-checkout/shallow-checkout
- node/install-yarn
- node/install-packages:
pkg-manager: yarn
- node/install-packages:
pkg-manager: yarn
app-dir: examples/default
- run:
name: Install Detox CLI
command: npm install --global detox-cli
- run:
name: Install Node Packages
command: yarn
- run:
name: Build Project
command: yarn build:lib
- run:
name: Install Example's Node Packages
working_directory: example
command: yarn
command: npm install -g detox-cli
- android/create-avd:
avd-name: Nexus_6P_API_27
install: true
Expand All @@ -225,25 +197,35 @@ jobs:
memory: 2048
post-emulator-launch-assemble-command: |
rm -rf ~/.gradle/caches
cd ~/project/example/android && ./gradlew androidDependencies
cd ~/project/examples/default/android && ./gradlew androidDependencies
cd .. && detox build -c android.emu.release
- run:
name: Detox - Run E2E Tests
working_directory: example
working_directory: examples/default
command: detox test -c android.emu.release

publish:
macos:
xcode: 13.4.1
working_directory: '~'
steps:
- checkout:
path: ~/project
- run: git clone https://InstabugCI:[email protected]/Instabug/Escape.git
- run: cd Escape && swift build -c release
- run: cd Escape/.build/release && cp -f Escape /usr/local/bin/escape
- run: cd project && yarn && yarn build
- run: cd project && Escape react-native publish
- advanced-checkout/shallow-checkout
- run: git clone [email protected]:Instabug/Escape.git
- run:
working_directory: Escape
command: swift build -c release
- run:
working_directory: Escape/.build/release
command: cp -f Escape /usr/local/bin/escape
- node/install-packages:
pkg-manager: yarn
app-dir: project
- run:
working_directory: project
command: yarn build
- run:
working_directory: project
command: Escape react-native publish

workflows:
publish:
Expand Down
2 changes: 1 addition & 1 deletion .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ module.exports = {
},
{
// Detox Overrides
files: ['example/e2e/**.js'],
files: ['examples/default/e2e/**.js'],
env: {
'jest/globals': true,
},
Expand Down
3 changes: 3 additions & 0 deletions .github/stale.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,3 +29,6 @@ closeComment: >
This issue has been automatically closed since we haven't heard back from
you. Please feel free to re-open the issue if you have more information
to add.

# Limit to only `issues` or `pulls`
only: issues
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ DerivedData
project.xcworkspace

# Cocoapods
example/ios/Pods
Pods/

# Android/IJ
.classpath
Expand Down
4 changes: 2 additions & 2 deletions .npmignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
# Misc
.github/
.circleci/
example/
examples/

# Config files
.eslintrc.js
Expand Down Expand Up @@ -61,7 +61,7 @@ DerivedData
project.xcworkspace

# Cocoapods
example/ios/Pods
Pods/

# Android/IJ
.classpath
Expand Down
9 changes: 9 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# Changelog

## [Unreleased](https://github.com/Instabug/Instabug-React-Native/compare/v11.9.1...dev)

### Added

- Add CodePush Support ([#877](https://github.com/Instabug/Instabug-React-Native/pull/877)).

## [11.9.1](https://github.com/Instabug/Instabug-React-Native/compare/v11.9.0...v11.9.1) (March 01, 2023)

### Changed
Expand Down Expand Up @@ -31,6 +37,9 @@
- Fixes external global error handlers not being called after initializing Instabug.
- Fixes `BugReporting.setDidSelectPromptOptionHandler` on iOS.
- Exports native Android SDK using `api` instead of `implementation`.
- Deprecates Instabug.start in favour of Instabug.init that takes a configuration object for SDK initialization.
- Deprecates Instabug.setDebugEnabled, Instabug.setSdkDebugLogsLevel, and APM.setLogLevel in favour of debugLogsLevel property, which can be passed to InstabugConfig while initializing the SDK using Instabug.init.
- Deprecates the enums: sdkDebugLogsLevel and logLevel in favour of a new enum LogLevel.

## 11.6.0 (2022-12-29)

Expand Down
3 changes: 3 additions & 0 deletions Gemfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
source "https://rubygems.org"

gem 'danger', '~> 8.6', '>= 8.6.1'
Loading