Skip to content

Commit b8621f0

Browse files
authored
Merge pull request #3 from srcpush/develop
Develop
2 parents 3ce40e5 + a2a8b2e commit b8621f0

File tree

13 files changed

+1729
-95
lines changed

13 files changed

+1729
-95
lines changed

.github/workflows/npm-publish.yml

Lines changed: 27 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,10 @@ name: Node.js build and publish package
33
on:
44
release:
55
types: [ created ]
6+
push:
7+
branches:
8+
- '**'
9+
workflow_dispatch:
610

711
jobs:
812
build:
@@ -24,6 +28,27 @@ jobs:
2428
node-version: 20
2529
registry-url: https://registry.npmjs.org/
2630
- run: npm i
27-
- run: npm publish
31+
32+
- name: Publish Release
33+
if: github.event_name == 'release'
34+
run: npm publish
2835
env:
29-
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}
36+
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}
37+
38+
- name: Publish Test Version
39+
if: github.event_name == 'push' || github.event_name == 'workflow_dispatch'
40+
env:
41+
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}
42+
run: |
43+
BRANCH_NAME=${GITHUB_REF#refs/heads/}
44+
echo "Branch: $BRANCH_NAME"
45+
46+
# Determine the new version
47+
NEW_VERSION=$(node scripts/bump-version.js "$BRANCH_NAME")
48+
echo "New Version: $NEW_VERSION"
49+
50+
# Set the version in package.json
51+
npm version $NEW_VERSION --no-git-tag-version
52+
53+
# Publish with 'test' tag
54+
npm publish --tag test

README.md

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
#### [Sign up With Source Push](https://console.srcpush.com/register) to use CodePush SDK
1+
#### [Sign up With Source Push](https://console.srcpush.com/register) to use Source Push SDK
22

33
# React Native SDK for Source Push (CodePush compatible service)
44

5-
This plugin provides client-side integration for the [CodePush service](https://srcpush.com/), allowing you to easily add a dynamic update experience to your React Native app(s).
5+
This plugin provides client-side integration for the [Source Push service](https://srcpush.com/), allowing you to easily add a dynamic update experience to your React Native app(s).
66

77
<!-- React Native Catalog -->
88

@@ -34,20 +34,20 @@ This plugin provides client-side integration for the [CodePush service](https://
3434

3535
A React Native app is composed of JavaScript files and any accompanying [images](https://reactnative.dev/docs/image), which are bundled together by the [metro bundler](https://github.com/facebook/metro) and distributed as part of a platform-specific binary (i.e. an `.ipa` or `.apk` file). Once the app is released, updating either the JavaScript code (e.g. making bug fixes, adding new features) or image assets, requires you to recompile and redistribute the entire binary, which of course, includes any review time associated with the store(s) you are publishing to.
3636

37-
The CodePush plugin helps get product improvements in front of your end users instantly, by keeping your JavaScript and images synchronized with updates you release to the CodePush server. This way, your app gets the benefits of an offline mobile experience, as well as the "web-like" agility of side-loading updates as soon as they are available. It's a win-win!
37+
The Source Push plugin helps get product improvements in front of your end users instantly, by keeping your JavaScript and images synchronized with updates you release to the Source Push server. This way, your app gets the benefits of an offline mobile experience, as well as the "web-like" agility of side-loading updates as soon as they are available. It's a win-win!
3838

39-
In order to ensure that your end users always have a functioning version of your app, the CodePush plugin maintains a copy of the previous update, so that in the event that you accidentally push an update which includes a crash, it can automatically roll back. This way, you can rest assured that your newfound release agility won't result in users becoming blocked before you have a chance to roll back on the server. It's a win-win-win!
39+
In order to ensure that your end users always have a functioning version of your app, the Source Push plugin maintains a copy of the previous update, so that in the event that you accidentally push an update which includes a crash, it can automatically roll back. This way, you can rest assured that your newfound release agility won't result in users becoming blocked before you have a chance to roll back on the server. It's a win-win-win!
4040

41-
*Note: Any product changes which touch native code (e.g. modifying your `AppDelegate.m`/`MainActivity.java` file, adding a new plugin) cannot be distributed via CodePush, and therefore, must be updated via the appropriate store(s).*
41+
*Note: Any product changes which touch native code (e.g. modifying your `AppDelegate.m`/`MainActivity.java` file, adding a new plugin) cannot be distributed via Source Push, and therefore, must be updated via the appropriate store(s).*
4242

4343
## Supported React Native platforms
4444

4545
* iOS (7+)
4646
* Android (4.1+) on TLS 1.2 compatible devices
4747

48-
We try our best to maintain backwards compatibility of our plugin with previous versions of React Native, but due to the nature of the platform, and the existence of breaking changes between releases, it is possible that you need to use a specific version of the CodePush plugin in order to support the exact version of React Native you are using. The following table outlines which CodePush plugin versions officially support the respective React Native versions:
48+
We try our best to maintain backwards compatibility of our plugin with previous versions of React Native, but due to the nature of the platform, and the existence of breaking changes between releases, it is possible that you need to use a specific version of the Source Push plugin in order to support the exact version of React Native you are using. The following table outlines which Source Push plugin versions officially support the respective React Native versions:
4949

50-
| React Native version(s) | Supporting CodePush version(s) |
50+
| React Native version(s) | Supporting Source Push version(s) |
5151
|-------------------------|---------------------------------------------------------------------------------------------|
5252
| <v0.76 | Use [microsoft/code-push-react-native](https://github.com/microsoft/react-native-code-push) |
5353
| v0.76, v0.77, 0.78 | v1.0+ *(Support both New and Old Architectures)* |
@@ -56,7 +56,7 @@ We work hard to respond to new RN releases, but they do occasionally break us. W
5656

5757
### Supported Components
5858

59-
When using the React Native assets system (i.e. using the `require("./foo.png")` syntax), the following list represents the set of core components (and props) that support having their referenced images and videos updated via CodePush:
59+
When using the React Native assets system (i.e. using the `require("./foo.png")` syntax), the following list represents the set of core components (and props) that support having their referenced images and videos updated via Source Push:
6060

6161
| Component | Prop(s) |
6262
|-------------------------------------------------|------------------------------------------|
@@ -67,30 +67,30 @@ When using the React Native assets system (i.e. using the `require("./foo.png")`
6767
| `ToolbarAndroid` <br />*(React Native 0.21.0+)* | `actions[].icon`, `logo`, `overflowIcon` |
6868
| `Video` | `source` |
6969

70-
The following list represents the set of components (and props) that don't currently support their assets being updated via CodePush, due to their dependency on static images and videos (i.e. using the `{ uri: "foo" }` syntax):
70+
The following list represents the set of components (and props) that don't currently support their assets being updated via Source Push, due to their dependency on static images and videos (i.e. using the `{ uri: "foo" }` syntax):
7171

7272
| Component | Prop(s) |
7373
|-------------|----------------------------------------------------------------------|
7474
| `SliderIOS` | `maximumTrackImage`, `minimumTrackImage`, `thumbImage`, `trackImage` |
7575
| `Video` | `source` |
7676

77-
As new core components are released, which support referencing assets, we'll update this list to ensure users know what exactly they can expect to update using CodePush.
77+
As new core components are released, which support referencing assets, we'll update this list to ensure users know what exactly they can expect to update using Source Push.
7878

79-
*Note: CodePush only works with Video components when using `require` in the source prop. For example:*
79+
*Note: Source Push only works with Video components when using `require` in the source prop. For example:*
8080

8181
```javascript
8282
<Video source={require("./foo.mp4")} />
8383
```
8484

8585
## Getting Started
8686

87-
After you've created an account on [Source Push](https://console.srcpush.com/register), you can start CodePush-ifying your React Native app by running the following command from within your app's root directory:
87+
After you've created an account on [Source Push](https://console.srcpush.com/register), you can start Source Push-ifying your React Native app by running the following command from within your app's root directory:
8888

8989
```shell
9090
npm install --save @srcpush/react-native-code-push
9191
```
9292

93-
As with all other React Native plugins, the integration experience is different for iOS and Android, so perform the following setup steps depending on which platform(s) you are targeting. Note, if you are targeting both platforms it is recommended to create separate CodePush applications for each platform.
93+
As with all other React Native plugins, the integration experience is different for iOS and Android, so perform the following setup steps depending on which platform(s) you are targeting. Note, if you are targeting both platforms it is recommended to create separate Source Push applications for each platform.
9494

9595
*NOTE: This guide assumes you have used the `@react-native-community/cli init` command to initialize your React Native project.*
9696

@@ -101,13 +101,13 @@ Then continue with installing the native module
101101

102102
## Plugin Usage
103103

104-
With the CodePush plugin downloaded and linked, and your app asking CodePush where to get the right JS bundle from, the only thing left is to add the necessary code to your app to control the following policies:
104+
With the Source Push plugin downloaded and linked, and your app asking Source Push where to get the right JS bundle from, the only thing left is to add the necessary code to your app to control the following policies:
105105

106106
1. When (and how often) to check for an update? (for example app start, in response to clicking a button in a settings page, periodically at some fixed interval)
107107

108108
2. When an update is available, how to present it to the end user?
109109

110-
The simplest way to do this is to "CodePush-ify" your app's root component. To do so, you can choose one of the following two options:
110+
The simplest way to do this is to "Source Push-ify" your app's root component. To do so, you can choose one of the following two options:
111111

112112
* **Option 1: Wrap your root component with the `codePush` higher-order component:**
113113

SECURITY.md

Lines changed: 5 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,16 @@
1-
<!-- BEGIN MICROSOFT SECURITY.MD V0.0.5 BLOCK -->
2-
31
## Security
42

5-
Microsoft takes the security of our software products and services seriously, which includes all source code repositories managed through our GitHub organizations, which include [Microsoft](https://github.com/Microsoft), [Azure](https://github.com/Azure), [DotNet](https://github.com/dotnet), [AspNet](https://github.com/aspnet), [Xamarin](https://github.com/xamarin), and [our GitHub organizations](https://opensource.microsoft.com/).
3+
Source Push takes the security of our software products and services seriously.
64

7-
If you believe you have found a security vulnerability in any Microsoft-owned repository that meets [Microsoft's definition of a security vulnerability](https://docs.microsoft.com/en-us/previous-versions/tn-archive/cc751383(v=technet.10)), please report it to us as described below.
5+
If you believe you have found a security vulnerability in this repository, please report it to us as described below.
86

97
## Reporting Security Issues
108

119
**Please do not report security vulnerabilities through public GitHub issues.**
1210

13-
Instead, please report them to the Microsoft Security Response Center (MSRC) at [https://msrc.microsoft.com/create-report](https://msrc.microsoft.com/create-report).
14-
15-
If you prefer to submit without logging in, send email to [secure@microsoft.com](mailto:secure@microsoft.com). If possible, encrypt your message with our PGP key; please download it from the [Microsoft Security Response Center PGP Key page](https://www.microsoft.com/en-us/msrc/pgp-key-msrc).
11+
Instead, please report them to us via email at [security@srcpush.com](mailto:security@srcpush.com).
1612

17-
You should receive a response within 24 hours. If for some reason you do not, please follow up via email to ensure we received your original message. Additional information can be found at [microsoft.com/msrc](https://www.microsoft.com/msrc).
13+
You should receive a response within 24 hours. If for some reason you do not, please follow up via email to ensure we received your original message.
1814

1915
Please include the requested information listed below (as much as you can provide) to help us better understand the nature and scope of the possible issue:
2016

@@ -26,16 +22,4 @@ Please include the requested information listed below (as much as you can provid
2622
* Proof-of-concept or exploit code (if possible)
2723
* Impact of the issue, including how an attacker might exploit the issue
2824

29-
This information will help us triage your report more quickly.
30-
31-
If you are reporting for a bug bounty, more complete reports can contribute to a higher bounty award. Please visit our [Microsoft Bug Bounty Program](https://microsoft.com/msrc/bounty) page for more details about our active programs.
32-
33-
## Preferred Languages
34-
35-
We prefer all communications to be in English.
36-
37-
## Policy
38-
39-
Microsoft follows the principle of [Coordinated Vulnerability Disclosure](https://www.microsoft.com/en-us/msrc/cvd).
40-
41-
<!-- END MICROSOFT SECURITY.MD BLOCK -->
25+
This information will help us triage your report more quickly.

0 commit comments

Comments
 (0)