@@ -59,10 +59,67 @@ 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
+ - install_node_modules
110
+ - prepare_custom_package :
111
+ npm_package : ' @instabug/instabug-reactnative-dream11'
112
+ android_package : dream11
113
+ api_endpoint : st001012dream11.instabug.com
114
+ working_directory : << parameters.working_directory >>
115
+ - run :
116
+ name : Give execute permission to Dream11 script
117
+ command : chmod +x ./scripts/dream-11-delete-unused-features.sh
118
+ working_directory : << parameters.working_directory >>
119
+ - run :
120
+ name : Remove unused features
121
+ command : ./scripts/dream-11-delete-unused-features.sh
122
+ working_directory : << parameters.working_directory >>
66
123
67
124
notify_github :
68
125
parameters :
@@ -264,33 +321,16 @@ jobs:
264
321
265
322
release_custom_package :
266
323
parameters :
267
- npm_package :
268
- type : string
269
- android_package :
270
- type : string
271
- api_endpoint :
272
- type : string
324
+ prepare_steps :
325
+ type : steps
326
+ default : []
273
327
working_directory : ~/project
274
328
executor :
275
329
name : node/default
276
330
steps :
277
331
- advanced-checkout/shallow-checkout
332
+ - steps : << parameters.prepare_steps >>
278
333
- 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
334
- run :
295
335
name : Build the SDK
296
336
command : yarn build
@@ -301,45 +341,6 @@ jobs:
301
341
name : Publish new enterprise version
302
342
command : npm publish
303
343
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
344
publish :
344
345
macos :
345
346
xcode : 13.4.1
@@ -463,12 +464,6 @@ workflows:
463
464
filters :
464
465
branches :
465
466
only : master
466
- - hold_release_d11 :
467
- requires : *release_dependencies
468
- type : approval
469
- filters :
470
- branches :
471
- only : dream11
472
467
- publish :
473
468
requires :
474
469
- hold_publish
@@ -481,6 +476,7 @@ workflows:
481
476
filters :
482
477
branches :
483
478
only : master
479
+
484
480
- hold_release_nn :
485
481
requires : *release_dependencies
486
482
type : approval
@@ -494,9 +490,12 @@ workflows:
494
490
filters :
495
491
branches :
496
492
only : master
497
- npm_package : ' @instabug/react-native-nn'
498
- android_package : nn
499
- api_endpoint : st001009nn.instabug.com
493
+ prepare_steps :
494
+ - prepare_custom_package :
495
+ npm_package : ' @instabug/react-native-nn'
496
+ android_package : nn
497
+ api_endpoint : st001009nn.instabug.com
498
+
500
499
- hold_release_injazat :
501
500
requires : *release_dependencies
502
501
type : approval
@@ -510,12 +509,24 @@ workflows:
510
509
filters :
511
510
branches :
512
511
only : master
513
- npm_package : ' @instabug/react-native-injazat'
514
- android_package : injazat
515
- api_endpoint : st001013mec1.instabug.com
516
- - release_d11 :
512
+ prepare_steps :
513
+ - prepare_custom_package :
514
+ npm_package : ' @instabug/react-native-injazat'
515
+ android_package : injazat
516
+ api_endpoint : st001013mec1.instabug.com
517
+
518
+ - hold_release_dream11 :
519
+ requires : *release_dependencies
520
+ type : approval
521
+ filters :
522
+ branches :
523
+ only : dream11
524
+ - release_custom_package :
525
+ name : release_dream11
517
526
requires :
518
- - hold_release_d11
527
+ - hold_release_dream11
519
528
filters :
520
529
branches :
521
530
only : dream11
531
+ prepare_steps :
532
+ - prepare_dream11
0 commit comments