-
Notifications
You must be signed in to change notification settings - Fork 24.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update ruby codegen to cleanup build folder. (#34398)
Summary: Pull Request resolved: #34398 This Diff cleans up the codegen folder for iOS when we install the pods. This is useful to start from a clean situation. The codegen runs after this step and we make sure that the file system is clean ## Changelog [iOS][Changed] - Cleanup codegen build folder before installing the pods Reviewed By: cortinico Differential Revision: D38657027 fbshipit-source-id: 8a914457d7963521d6d8dc7819eba864736f50a0
- Loading branch information
1 parent
06b55a3
commit 0e316ec
Showing
5 changed files
with
124 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
# Copyright (c) Meta Platforms, Inc. and affiliates. | ||
# | ||
# This source code is licensed under the MIT license found in the | ||
# LICENSE file in the root directory of this source tree. | ||
|
||
module FileUtils | ||
|
||
|
||
class FileUtilsStorage | ||
@@RMRF_INVOCATION_COUNT = 0 | ||
@@RMRF_PATHS = [] | ||
|
||
def self.rmrf_invocation_count | ||
return @@RMRF_INVOCATION_COUNT | ||
end | ||
|
||
def self.increase_rmrfi_invocation_count | ||
@@RMRF_INVOCATION_COUNT += 1 | ||
end | ||
|
||
def self.rmrf_paths | ||
return @@RMRF_PATHS | ||
end | ||
|
||
def self.push_rmrf_path(path) | ||
@@RMRF_PATHS.push(path) | ||
end | ||
|
||
def self.reset | ||
@@RMRF_INVOCATION_COUNT = 0 | ||
@@RMRF_PATHS = [] | ||
end | ||
end | ||
|
||
def self.rm_rf(path) | ||
FileUtilsStorage.push_rmrf_path(path) | ||
FileUtilsStorage.increase_rmrfi_invocation_count | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters