-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' into seqerakit-docs-port
- Loading branch information
Showing
8 changed files
with
544 additions
and
471 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -31,3 +31,7 @@ internal/tmp | |
|
||
# Local Netlify folder | ||
.netlify | ||
|
||
# OSS repo clones | ||
multiqc_docs/multiqc_repo | ||
wave_docs/wave_repo |
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 |
---|---|---|
@@ -1,6 +0,0 @@ | ||
[submodule "wave_docs/wave_repo"] | ||
path = wave_docs/wave_repo | ||
url = https://github.com/seqeralabs/wave | ||
[submodule "multiqc_docs/multiqc_repo"] | ||
path = multiqc_docs/multiqc_repo | ||
url = https://github.com/MultiQC/MultiQC | ||
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,62 @@ | ||
import git from "simple-git"; | ||
import fs from "fs-extra"; | ||
import "dotenv/config"; | ||
import path from "path"; | ||
import { fileURLToPath } from "url"; | ||
|
||
const __filename = fileURLToPath(import.meta.url); | ||
const __dirname = path.dirname(__filename); | ||
|
||
const repositories = [ | ||
{ | ||
name: 'multiqc', | ||
url: 'https://github.com/MultiQC/MultiQC.git', | ||
path: path.join(__dirname, "..", "multiqc_docs", "multiqc_repo") | ||
}, | ||
{ | ||
name: 'wave', | ||
url: 'https://github.com/seqeralabs/wave.git', | ||
path: path.join(__dirname, "..", "wave_docs", "wave_repo") | ||
} | ||
]; | ||
|
||
// Function to clone or update a repository | ||
async function cloneOrUpdateRepo({ name, url, path: repoPath }) { | ||
const exists = await fs.pathExists(repoPath + "/.git"); | ||
|
||
try { | ||
if (exists) { | ||
console.log(`${name}: Cloned repo already exists, will pull latest changes`); | ||
await git(repoPath).pull(); | ||
console.log(`✅ ${name}: Pulled latest changes`); | ||
} else { | ||
console.log(`${name}: Cloning into ${repoPath}`); | ||
await git().clone(url, repoPath); | ||
console.log(`✅ ${name}: Cloned`); | ||
} | ||
} catch (error) { | ||
console.error(`❌ Error processing ${repo.name}:`); | ||
console.error(error.message); | ||
if (exists) { | ||
console.error(`Try removing the directory: ${repoPath}`); | ||
} | ||
// Exit with error code 1 to stop any subsequent npm scripts | ||
process.exit(1); | ||
} | ||
|
||
return git(repoPath); | ||
} | ||
|
||
// Clone/update all repositories | ||
async function processRepositories() { | ||
for (const repo of repositories) { | ||
try { | ||
await cloneOrUpdateRepo(repo); | ||
} catch (error) { | ||
console.error(`❌ Error processing ${repo.name}:`, error); | ||
} | ||
} | ||
} | ||
|
||
// Execute | ||
processRepositories().catch(console.error); |
Submodule multiqc_repo
deleted from
d66055
Large diffs are not rendered by default.
Oops, something went wrong.
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
Submodule wave_repo
deleted from
080d5c