@@ -59,10 +59,66 @@ commands:
59
59
type : string
60
60
replace :
61
61
type : string
62
+ working_directory :
63
+ type : string
64
+ default : ~/project
62
65
steps :
63
66
- run :
64
67
name : Find and Replace in << parameters.files >>
65
68
command : node ~/project/scripts/replace.js << parameters.search >> << parameters.replace >> << parameters.files >>
69
+ working_directory : << parameters.working_directory >>
70
+
71
+ prepare_custom_package :
72
+ parameters :
73
+ npm_package :
74
+ type : string
75
+ android_package :
76
+ type : string
77
+ api_endpoint :
78
+ type : string
79
+ working_directory :
80
+ type : string
81
+ default : ~/project
82
+ steps :
83
+ - run :
84
+ name : Remove README.md file
85
+ command : rm README.md
86
+ working_directory : << parameters.working_directory >>
87
+ - find_and_replace :
88
+ files : package.json android/sourcemaps.gradle ios/sourcemaps.sh
89
+ search : instabug-reactnative
90
+ replace : << parameters.npm_package >>
91
+ working_directory : << parameters.working_directory >>
92
+ - find_and_replace :
93
+ files : cli/upload/uploadSourcemaps.ts cli/upload/uploadSoFiles.ts
94
+ search : api.instabug.com
95
+ replace : << parameters.api_endpoint >>
96
+ working_directory : << parameters.working_directory >>
97
+ - find_and_replace :
98
+ files : android/native.gradle
99
+ search : ' com.instabug.library:instabug:'
100
+ replace : ' com.instabug.library-<< parameters.android_package >>:instabug:'
101
+ working_directory : << parameters.working_directory >>
102
+
103
+ prepare_dream11 :
104
+ parameters :
105
+ working_directory :
106
+ type : string
107
+ default : ~/project
108
+ steps :
109
+ - prepare_custom_package :
110
+ npm_package : ' @instabug/instabug-reactnative-dream11'
111
+ android_package : dream11
112
+ api_endpoint : st001012dream11.instabug.com
113
+ working_directory : << parameters.working_directory >>
114
+ - run :
115
+ name : Give execute permission to Dream11 script
116
+ command : chmod +x ./scripts/dream-11-delete-unused-features.sh
117
+ working_directory : << parameters.working_directory >>
118
+ - run :
119
+ name : Remove unused features
120
+ command : ./scripts/dream-11-delete-unused-features.sh
121
+ working_directory : << parameters.working_directory >>
66
122
67
123
notify_github :
68
124
parameters :
@@ -264,33 +320,16 @@ jobs:
264
320
265
321
release_custom_package :
266
322
parameters :
267
- npm_package :
268
- type : string
269
- android_package :
270
- type : string
271
- api_endpoint :
272
- type : string
323
+ prepare_steps :
324
+ type : steps
325
+ default : []
273
326
working_directory : ~/project
274
327
executor :
275
328
name : node/default
276
329
steps :
277
330
- advanced-checkout/shallow-checkout
331
+ - steps : << parameters.prepare_steps >>
278
332
- install_node_modules
279
- - run :
280
- name : Remove README.md file
281
- command : rm README.md
282
- - find_and_replace :
283
- files : package.json android/sourcemaps.gradle ios/sourcemaps.sh
284
- search : instabug-reactnative
285
- replace : << parameters.npm_package >>
286
- - find_and_replace :
287
- files : cli/UploadSourcemaps.ts cli/UploadSoFiles.ts
288
- search : api.instabug.com
289
- replace : << parameters.api_endpoint >>
290
- - find_and_replace :
291
- files : android/native.gradle
292
- search : ' com.instabug.library:instabug:'
293
- replace : ' com.instabug.library-<< parameters.android_package >>:instabug:'
294
333
- run :
295
334
name : Build the SDK
296
335
command : yarn build
@@ -301,45 +340,6 @@ jobs:
301
340
name : Publish new enterprise version
302
341
command : npm publish
303
342
304
- # Automate the enterprise D11 sdk changes
305
- release_d11 :
306
- working_directory : ~/project
307
- executor :
308
- name : node/default
309
- steps :
310
- - advanced-checkout/shallow-checkout
311
- - install_node_modules
312
- - run :
313
- name : Remove README.md file
314
- command : rm README.md
315
- - find_and_replace :
316
- files : package.json ios/sourcemaps.sh android/sourcemaps.gradle
317
- search : instabug-reactnative
318
- replace : ' @instabug/instabug-reactnative-dream11'
319
- - find_and_replace :
320
- files : cli/UploadSourcemaps.ts cli/UploadSoFiles.ts
321
- search : api.instabug.com
322
- replace : st001012dream11.instabug.com
323
- - find_and_replace :
324
- files : android/native.gradle
325
- search : com.instabug.library:instabug
326
- replace : ' com.instabug.library-dream11:instabug'
327
- - run :
328
- name : give exec permssion to d11 script
329
- command : chmod +x ./scripts/dream-11-delete-unused-features.sh
330
- - run :
331
- name : remove un-required features
332
- command : ./scripts/dream-11-delete-unused-features.sh
333
- - run :
334
- name : Build the SDK
335
- command : yarn build
336
- - run :
337
- name : Authorize with npm
338
- command : echo "//registry.npmjs.org/:_authToken=${NPM_TOKEN}" > ~/.npmrc
339
- - run :
340
- name : Publish new enterprise version
341
- command : npm publish
342
-
343
343
publish :
344
344
macos :
345
345
xcode : 13.4.1
@@ -463,12 +463,6 @@ workflows:
463
463
filters :
464
464
branches :
465
465
only : master
466
- - hold_release_d11 :
467
- requires : *release_dependencies
468
- type : approval
469
- filters :
470
- branches :
471
- only : dream11
472
466
- publish :
473
467
requires :
474
468
- hold_publish
@@ -481,6 +475,7 @@ workflows:
481
475
filters :
482
476
branches :
483
477
only : master
478
+
484
479
- hold_release_nn :
485
480
requires : *release_dependencies
486
481
type : approval
@@ -494,9 +489,12 @@ workflows:
494
489
filters :
495
490
branches :
496
491
only : master
497
- npm_package : ' @instabug/react-native-nn'
498
- android_package : nn
499
- api_endpoint : st001009nn.instabug.com
492
+ prepare_steps :
493
+ - prepare_custom_package :
494
+ npm_package : ' @instabug/react-native-nn'
495
+ android_package : nn
496
+ api_endpoint : st001009nn.instabug.com
497
+
500
498
- hold_release_injazat :
501
499
requires : *release_dependencies
502
500
type : approval
@@ -510,12 +508,24 @@ workflows:
510
508
filters :
511
509
branches :
512
510
only : master
513
- npm_package : ' @instabug/react-native-injazat'
514
- android_package : injazat
515
- api_endpoint : st001013mec1.instabug.com
516
- - release_d11 :
511
+ prepare_steps :
512
+ - prepare_custom_package :
513
+ npm_package : ' @instabug/react-native-injazat'
514
+ android_package : injazat
515
+ api_endpoint : st001013mec1.instabug.com
516
+
517
+ - hold_release_dream11 :
518
+ requires : *release_dependencies
519
+ type : approval
520
+ filters :
521
+ branches :
522
+ only : dream11
523
+ - release_custom_package :
524
+ name : release_dream11
517
525
requires :
518
- - hold_release_d11
526
+ - hold_release_dream11
519
527
filters :
520
528
branches :
521
529
only : dream11
530
+ prepare_steps :
531
+ - prepare_dream11
0 commit comments