@@ -50,16 +50,20 @@ commands:
50
50
key : v1-pods-{{ checksum "<< parameters.working_directory >>/Podfile.lock" }}
51
51
paths :
52
52
- << parameters.working_directory >>/Pods
53
- search_and_replace :
53
+ find_and_replace :
54
54
parameters :
55
- file :
55
+ files :
56
+ description : A space-separated list of files to search and replace in.
56
57
type : string
57
- replace-pattern :
58
+ search :
59
+ type : string
60
+ replace :
58
61
type : string
59
62
steps :
60
63
- run :
61
- name : Search and Replace in << parameters.file >>
62
- command : sed -i '<< parameters.replace-pattern >>' << parameters.file >>
64
+ name : Find and Replace in << parameters.files >>
65
+ command : node ~/project/scripts/replace.js << parameters.search >> << parameters.replace >> << parameters.files >>
66
+
63
67
notify_github :
64
68
parameters :
65
69
data :
@@ -258,37 +262,14 @@ jobs:
258
262
working_directory : examples/default
259
263
command : detox test -c android.emu.release
260
264
261
- # Automate the enterprise NN sdk changes
262
- release_nn :
263
- working_directory : ~/project
264
- executor :
265
- name : node/default
266
- steps :
267
- - advanced-checkout/shallow-checkout
268
- - install_node_modules
269
- - run :
270
- name : Remove README.md file
271
- command : rm README.md
272
- - search_and_replace :
273
- file : package.json
274
- replace-pattern : ' s/instabug-reactnative/@instabug\/react-native-nn/g'
275
- - search_and_replace :
276
- file : cli/UploadSourcemaps.ts
277
- replace-pattern : ' s/api.instabug.com\/api\/sdk/st001009nn.instabug.com\/api\/sdk/g'
278
- - search_and_replace :
279
- file : android/native.gradle
280
- replace-pattern : ' s/com\.instabug\.library:instabug:/com.instabug.library-nn:instabug:/g'
281
- - run :
282
- name : Build the SDK
283
- command : yarn build
284
- - run :
285
- name : Authorize with npm
286
- command : echo "//registry.npmjs.org/:_authToken=${NPM_TOKEN}" > ~/.npmrc
287
- - run :
288
- name : Publish new enterprise version
289
- command : npm publish
290
- # Automate the enterprise injazat sdk changes
291
- release_injazat :
265
+ release_custom_package :
266
+ parameters :
267
+ npm_package :
268
+ type : string
269
+ android_package :
270
+ type : string
271
+ api_endpoint :
272
+ type : string
292
273
working_directory : ~/project
293
274
executor :
294
275
name : node/default
@@ -298,24 +279,28 @@ jobs:
298
279
- run :
299
280
name : Remove README.md file
300
281
command : rm README.md
301
- - search_and_replace :
302
- file : package.json
303
- replace-pattern : ' s/instabug-reactnative/@instabug\/react-native-injazat/g'
304
- - search_and_replace :
305
- file : cli/UploadSourcemaps.ts
306
- replace-pattern : ' s/api.instabug.com\/api\/sdk/st001013mec1.instabug.com\/api\/sdk/g'
307
- - search_and_replace :
308
- file : android/native.gradle
309
- replace-pattern : ' s/com\.instabug\.library:instabug:/com.instabug.library-injazat:instabug:/g'
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:'
310
294
- run :
311
295
name : Build the SDK
312
296
command : yarn build
313
297
- run :
314
- name : Authorize with npm
298
+ name : Authorize with NPM
315
299
command : echo "//registry.npmjs.org/:_authToken=${NPM_TOKEN}" > ~/.npmrc
316
300
- run :
317
301
name : Publish new enterprise version
318
302
command : npm publish
303
+
319
304
# Automate the enterprise D11 sdk changes
320
305
release_d11 :
321
306
working_directory : ~/project
@@ -327,15 +312,18 @@ jobs:
327
312
- run :
328
313
name : Remove README.md file
329
314
command : rm README.md
330
- - search_and_replace :
331
- file : package.json
332
- replace-pattern : ' s/instabug-reactnative/@instabug\/instabug-reactnative-dream11/g'
333
- - search_and_replace :
334
- file : cli/UploadSourcemaps.ts
335
- replace-pattern : ' s/api.instabug.com\/api\/sdk/st001012dream11.instabug.com\/api\/sdk/g'
336
- - search_and_replace :
337
- file : android/native.gradle
338
- replace-pattern : ' s/com\.instabug\.library:instabug:/com.instabug.library-dream11:instabug:/g'
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:'
339
327
- run :
340
328
name : give exec permssion to d11 script
341
329
command : chmod +x ./scripts/dream-11-delete-unused-features.sh
@@ -381,9 +369,10 @@ jobs:
381
369
working_directory : ' ~'
382
370
steps :
383
371
- advanced-checkout/shallow-checkout
384
- - search_and_replace :
385
- file : package.json
386
- replace-pattern : ' s/instabug-reactnative/@instabug\/react-native/g'
372
+ - find_and_replace :
373
+ files : package.json
374
+ search : instabug-reactnative
375
+ replace : ' @instabug/react-native'
387
376
-
run :
git clone [email protected] :Instabug/Escape.git
388
377
- run :
389
378
working_directory : Escape
@@ -469,15 +458,6 @@ workflows:
469
458
filters :
470
459
branches :
471
460
only : master
472
- - hold_release_nn :
473
- requires : *release_dependencies
474
- type : approval
475
- filters :
476
- branches :
477
- only : master
478
- - hold_release_injazat :
479
- requires : *release_dependencies
480
- type : approval
481
461
- hold_publish_new_namespace :
482
462
requires : *release_dependencies
483
463
type : approval
@@ -499,15 +479,26 @@ workflows:
499
479
filters :
500
480
branches :
501
481
only : master
502
- - release_nn :
482
+ - hold_release_nn :
483
+ requires : *release_dependencies
484
+ type : approval
485
+ - release_custom_package :
486
+ name : release_nn
503
487
requires :
504
488
- hold_release_nn
505
- filters :
506
- branches :
507
- only : master
508
- - release_injazat :
489
+ npm_package : ' @instabug/react-native-nn'
490
+ android_package : nn
491
+ api_endpoint : st001009nn.instabug.com
492
+ - hold_release_injazat :
493
+ requires : *release_dependencies
494
+ type : approval
495
+ - release_custom_package :
496
+ name : release_injazat
509
497
requires :
510
498
- hold_release_injazat
499
+ npm_package : ' @instabug/react-native-injazat'
500
+ android_package : injazat
501
+ api_endpoint : st001013mec1.instabug.com
511
502
- release_d11 :
512
503
requires :
513
504
- hold_release_d11
0 commit comments