Skip to content

Commit

Permalink
chore: remove-git-lock (#1423)
Browse files Browse the repository at this point in the history
<!-- For Coveo Employees only. Fill this section.

CDX-764

-->

This piece of code fails, we removed it UI-Kit side, let's do the same
here (fix-it-twice maybe later: import the new nicer logic from UI-Kit)
  • Loading branch information
louis-bompart authored Feb 15, 2024
1 parent 0602475 commit 38270ca
Showing 1 changed file with 0 additions and 17 deletions.
17 changes: 0 additions & 17 deletions utils/release/git-lock.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,6 @@
import {
gitPull,
getSHA1fromRef,
gitCommit,
gitPush,
gitAdd,
gitSetupSshRemote,
gitSetupUser,
} from '@coveo/semantic-monorepo-tools';
Expand All @@ -15,8 +12,6 @@ import {
limitWriteAccessToBot,
removeWriteAccessRestrictions,
} from './lock-master.mjs';
import {writeFileSync} from 'node:fs';
import {spawnSync} from 'node:child_process';

const isPrerelease = process.env.IS_PRERELEASE === 'true';
const noLockRequired = Boolean(process.env.NO_LOCK);
Expand All @@ -43,17 +38,6 @@ const ensureUpToDateBranch = async () => {
}
};

/**
* This will make .github\workflows\git-lock-fail.yml run and thus fail the associated check.
*/
const lockBranch = async () => {
writeFileSync('.git-lock', '');
await gitAdd('.git-lock');
await gitCommit('[skip ci]: lock master', PATH);
await gitPush({remote: GIT_SSH_REMOTE});
spawnSync('git', ['reset', '--hard', 'HEAD~1']);
};

const setupGit = async () => {
const GIT_USERNAME = 'developer-experience-bot[bot]';
const GIT_EMAIL =
Expand All @@ -70,5 +54,4 @@ const setupGit = async () => {
if (!(isPrerelease || noLockRequired)) {
await setupGit();
await ensureUpToDateBranch();
await lockBranch();
}

0 comments on commit 38270ca

Please sign in to comment.