File tree Expand file tree Collapse file tree 7 files changed +34
-27
lines changed
Expand file tree Collapse file tree 7 files changed +34
-27
lines changed Original file line number Diff line number Diff line change 2323 - uses : actions/setup-node@v1
2424 with :
2525 node-version : 14.21.3
26- - run : npm install
27-
28- - name : npm build
29- run : npm run build
3026
31- - name : build react-native-sdk
32- run : |
33- curl -u ${{ secrets.JFROG_USERNAME }}:${{ secrets.JFROG_PASSWORD }} https://prekarilabs.jfrog.io/prekarilabs/api/npm/auth/ > ~/.npmrc
34- npm config set registry https://prekarilabs.jfrog.io/prekarilabs/api/npm/npm/
35- npm config set unsafe-perm true
36- npm run build
27+ - run : npm install
3728
3829 - name : Get Previous tag
3930 id : previoustag
5445 git commit -m "[AUTOMATED] Private Release ${{ steps.previoustag.outputs.tag }}-dev.$(git rev-parse --short $GITHUB_SHA)"
5546 git push origin -f
5647
57- - name : publish to jfrog
48+ - name : build react-native-sdk
5849 run : |
59- npm publish
50+ curl -u ${{ secrets.JFROG_USERNAME }}:${{ secrets.JFROG_PASSWORD }} https://prekarilabs.jfrog.io/prekarilabs/api/npm/auth/ > ~/.npmrc
51+ npm config set registry https://prekarilabs.jfrog.io/prekarilabs/api/npm/npm/
52+ npm config set unsafe-perm true
53+ npm run build
54+
55+ - name : publish to jfrog
56+ run : npm publish
Original file line number Diff line number Diff line change @@ -20,14 +20,11 @@ jobs:
2020 with :
2121 node-version : 14.21.3
2222 registry-url : ' https://registry.npmjs.org'
23- - run : npm install
23+
2424
2525 - name : install modules
2626 run : npm install
2727
28- - name : Build
29- run : npm run build
30-
3128 - name : Get Previous tag
3229 id : previoustag
3330 uses : WyriHaximus/github-action-get-previous-tag@v1
4744 git commit -m "[AUTOMATED] Public Release - ${{ steps.previoustag.outputs.tag }}"
4845 git push
4946
47+ - name : Build
48+ run : npm run build
49+
5050 - name : publish to npm
5151 run : npm publish
5252 env :
Original file line number Diff line number Diff line change 44 "description" : " Skyflow React Native SDK" ,
55 "main" : " lib/commonjs/index" ,
66 "module" : " lib/module/index" ,
7- "types" : " lib/typescript/src/index.d.ts" ,
8- "exports" : {
9- "." : {
10- "types" : " ./lib/typescript/src/index.d.ts" ,
11- "import" : " ./lib/module/index.js" ,
12- "require" : " ./lib/commonjs/index.js"
13- }
14- },
7+ "types" : " lib/typescript/index.d.ts" ,
158 "react-native" : " src/index" ,
169 "source" : " src/index" ,
1710 "files" : [
3629 "prepare" : " bob build" ,
3730 "example" : " yarn --cwd example" ,
3831 "bootstrap" : " yarn example && yarn && yarn example pods" ,
39- "build" : " bob build && cp -r assets lib/ && cp package.json lib/"
32+ "build" : " node scripts/generateSdkDetails.js && bob build && cp -r assets lib/"
4033 },
4134 "keywords" : [
4235 " react-native" ,
Original file line number Diff line number Diff line change 1+ const fs = require ( 'fs' ) ;
2+ const pkg = require ( '../package.json' ) ;
3+
4+ const content = `
5+ export const sdkDetails = {
6+ name: "${ pkg . name } ",
7+ version: "${ pkg . version } ",
8+ reactNativeVersion: "${ pkg . devDependencies [ 'react-native' ] } "
9+ };
10+ ` ;
11+
12+ fs . writeFileSync ( 'src/sdkDetails.ts' , content ) ;
Original file line number Diff line number Diff line change @@ -7,7 +7,7 @@ import SkyflowError from '../../utils/skyflow-error';
77import SKYFLOW_ERROR_CODE from '../../utils/skyflow-error-code' ;
88import { getMetaObject } from '../../utils/helpers' ;
99import { Platform } from 'react-native' ;
10- import sdkDetails from '../../../package.json ' ;
10+ import { sdkDetails } from '../../sdkDetails ' ;
1111
1212export interface IClientRequest {
1313 body ?: any ;
Original file line number Diff line number Diff line change @@ -13,7 +13,7 @@ import maseterCardIcon from '../../../assets/mastercard.png';
1313import unionPayIcon from '../../../assets/unionpay.png' ;
1414import visaCardIcon from '../../../assets/visa.png' ;
1515import cartesBancairesIcon from '../../../assets/carter-banceris.png'
16- import sdkDetails from '../../../package.json ' ;
16+ import { sdkDetails } from '../../sdkDetails ' ;
1717
1818export const SDK_DETAILS = {
1919 sdkName : 'React Native' ,
Original file line number Diff line number Diff line change 1+ export const sdkDetails = {
2+ name : '' ,
3+ version : '' ,
4+ reactNativeVersion : '' ,
5+ } ;
You can’t perform that action at this time.
0 commit comments