From cd78f44e583e845c2111a44d07e034f7f38ae357 Mon Sep 17 00:00:00 2001 From: Alex Hunt Date: Fri, 31 Jan 2025 09:18:31 -0800 Subject: [PATCH] Remove unused checkForGitChanges script (#49099) Summary: Pull Request resolved: https://github.com/facebook/react-native/pull/49099 Changelog: [Internal] Reviewed By: EdmondChuiHW Differential Revision: D68960652 fbshipit-source-id: 138e83dfedef7ea717502a1e964eb802dae678c4 --- scripts/monorepo/check-for-git-changes.js | 39 ----------------------- 1 file changed, 39 deletions(-) delete mode 100644 scripts/monorepo/check-for-git-changes.js diff --git a/scripts/monorepo/check-for-git-changes.js b/scripts/monorepo/check-for-git-changes.js deleted file mode 100644 index 77e2d5d0190..00000000000 --- a/scripts/monorepo/check-for-git-changes.js +++ /dev/null @@ -1,39 +0,0 @@ -/** - * 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. - * - * @format - */ - -const {spawnSync} = require('child_process'); -const path = require('path'); - -const ROOT_LOCATION = path.join(__dirname, '..', '..'); - -const checkForGitChanges = () => { - const {stdout: thereIsSomethingToCommit, stderr} = spawnSync( - 'git', - ['status', '--porcelain'], - { - cwd: ROOT_LOCATION, - shell: true, - stdio: 'pipe', - encoding: 'utf-8', - }, - ); - - if (stderr) { - console.log( - '\u274c An error occured while running `git status --porcelain`:', - ); - console.log(stderr); - - process.exit(1); - } - - return Boolean(thereIsSomethingToCommit); -}; - -module.exports = checkForGitChanges;