File tree Expand file tree Collapse file tree 2 files changed +20
-4
lines changed Expand file tree Collapse file tree 2 files changed +20
-4
lines changed Original file line number Diff line number Diff line change @@ -296,14 +296,22 @@ def clean_project
296
296
paths . concat ( Dir . glob ( self . resources_dirs . flatten . map { |x | x + '/**/*.{nib,storyboardc,momd}' } ) )
297
297
paths . each do |p |
298
298
next if File . extname ( p ) == ".nib" && !File . exist? ( p . sub ( /\. nib$/ , ".xib" ) )
299
- App . info 'Delete' , p
299
+ App . info 'Delete' , relative_path ( p )
300
300
rm_rf p
301
301
if File . exist? ( p )
302
302
# It can happen that because of file permissions a dir/file is not
303
303
# actually removed, which can lead to confusing issues.
304
- App . fail "Failed to remove `#{ p } '. Please remove this path manually."
304
+ App . fail "Failed to remove `#{ relative_path ( p ) } '. Please remove this path manually."
305
305
end
306
306
end
307
307
end
308
+
309
+ def relative_path ( path )
310
+ if ENV [ 'RM_TARGET_HOST_APP_PATH' ]
311
+ Pathname . new ( File . expand_path ( path ) ) . relative_path_from ( Pathname . new ( ENV [ 'RM_TARGET_HOST_APP_PATH' ] ) ) . to_s
312
+ else
313
+ path
314
+ end
315
+ end
308
316
end
309
317
end ; end
Original file line number Diff line number Diff line change @@ -51,12 +51,12 @@ def clean
51
51
[ XcodeBuildDir , 'build' , 'build-iPhoneSimulator' , 'build-iPhoneOS' ] . each do |build_dir |
52
52
build_dir = File . join ( @path , build_dir )
53
53
if File . exist? ( build_dir )
54
- App . info 'Delete' , build_dir
54
+ App . info 'Delete' , relative_path ( build_dir )
55
55
FileUtils . rm_rf build_dir
56
56
if File . exist? ( build_dir )
57
57
# It can happen that because of file permissions a dir/file is not
58
58
# actually removed, which can lead to confusing issues.
59
- App . fail "Failed to remove `#{ build_dir } '. Please remove this path manually."
59
+ App . fail "Failed to remove `#{ relative_path ( build_dir ) } '. Please remove this path manually."
60
60
end
61
61
end
62
62
end
@@ -262,5 +262,13 @@ def bridgesupport_build_path(build_dir)
262
262
end
263
263
bs_file
264
264
end
265
+
266
+ def relative_path ( path )
267
+ if ENV [ 'RM_TARGET_HOST_APP_PATH' ]
268
+ Pathname . new ( File . expand_path ( path ) ) . relative_path_from ( Pathname . new ( ENV [ 'RM_TARGET_HOST_APP_PATH' ] ) ) . to_s
269
+ else
270
+ path
271
+ end
272
+ end
265
273
end
266
274
end ; end
You can’t perform that action at this time.
0 commit comments