Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DOP-5238 Clone docs-laravel submodule for Netlify deploys #52

Merged
merged 26 commits into from
Dec 17, 2024
Merged
Changes from all commits
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
bb452b5
DOP-5238 add conditional for cloning docs-laravel repo
anabellabuckvar Dec 16, 2024
261577c
DOP-5238 fix repo name
anabellabuckvar Dec 16, 2024
ed92e15
DOP-5238 cd into laravel
anabellabuckvar Dec 16, 2024
fb30d2e
DOP-5238 cd into laravel
anabellabuckvar Dec 16, 2024
964e736
DOP-5238 don't cd into laravel
anabellabuckvar Dec 16, 2024
a1c4a8a
DOP-5238 cd into laravel
anabellabuckvar Dec 16, 2024
9c91ba8
DOP-5238 use chdir
anabellabuckvar Dec 16, 2024
c92b43d
DOP-5238 separate out lines
anabellabuckvar Dec 16, 2024
c2db062
DOP-5238 ls
anabellabuckvar Dec 16, 2024
df2dd2d
DOP-5238 ls laravel-mongodb
anabellabuckvar Dec 16, 2024
cec4a6e
DOP-5238 use rsync
anabellabuckvar Dec 16, 2024
abf712d
DOP-5238 use rsync
anabellabuckvar Dec 16, 2024
e00c71e
DOP-5238 change order of removal of git config
anabellabuckvar Dec 16, 2024
7dbaf00
DOP-5238 cleaning up
anabellabuckvar Dec 16, 2024
33bce73
DOP-5238 remove process.cwd
anabellabuckvar Dec 16, 2024
443f53a
DOP-5238 remove extra ls
anabellabuckvar Dec 16, 2024
98de4d8
DOP-5238 go back up a dir
anabellabuckvar Dec 16, 2024
c99d8a5
DOP-5238 see whats inside source
anabellabuckvar Dec 16, 2024
680cdb4
DOP-5238 use cp
anabellabuckvar Dec 16, 2024
461eb69
DOP-5238 use cp
anabellabuckvar Dec 16, 2024
3f2f612
DOP-5238 cleanup
anabellabuckvar Dec 16, 2024
9e68deb
DOP-5238 cleanup
anabellabuckvar Dec 16, 2024
0f12d95
DOP-5238 cleanup again
anabellabuckvar Dec 16, 2024
b69868a
DOP-5238 address nits
anabellabuckvar Dec 17, 2024
fd3880d
DOP-5238 don't chdir
anabellabuckvar Dec 17, 2024
77a08ce
DOP-5238 remove extra chdir
anabellabuckvar Dec 17, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 12 additions & 1 deletion extensions/populate-metadata/src/updateConfig.ts
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ const cloneContentRepo = async ({
branchName: string;
orgName: string;
}) => {
if (fs.existsSync(`${process.cwd()}/${repoName}`)) {
if (fs.existsSync(repoName)) {
await run.command(`rm -r ${repoName}`);
}

Expand All @@ -96,6 +96,17 @@ const cloneContentRepo = async ({
if (fs.existsSync(`${repoName}/.git/config`)) {
await run.command(`rm -r ${repoName}/.git/config`);
}

// Docs-laravel requires a submodule to build
if (repoName === 'docs-laravel') {
await run.command('git submodule update --init --recursive', {
cwd: repoName,
});
await run.command('cp -r laravel-mongodb/docs source', {
cwd: repoName,
});
console.log('docs-laravel submodule updated successfully');
}
};

export const updateConfig = async ({
Expand Down
Loading