-
Notifications
You must be signed in to change notification settings - Fork 0
/
update.mjs
31 lines (27 loc) · 1.79 KB
/
update.mjs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
import * as childProcess from "child_process";
import fs from "fs";
const repos = [
{owner: "abapGit", repo: "abapGit", folder: "src", license: "/LICENSE"},
{owner: "larshp", repo: "abapOpenChecks", folder: "src", license: "/LICENSE"},
{owner: "larshp", repo: "abapPGP", folder: "src", license: "/LICENSE"},
{owner: "stockbal", repo: "abap-db-browser", folder: "src", license: "/LICENSE"},
{owner: "SAP", repo: "code-pal-for-abap", folder: "src", license: "/LICENSE"},
{owner: "pixelbaker", repo: "ABAP-RayTracer", folder: "src", license: "/LICENSE"},
{owner: "rayatus", repo: "sapbugtracker", folder: "zbugtracker_core", license: "/LICENSE"},
{owner: "watson-developer-cloud", repo: "abap-sdk-nwas", folder: "src", license: "/LICENSE"},
{owner: "nomssi", repo: "abap_scheme", folder: "src", license: "/LICENSE"},
{owner: "bizhuka", repo: "xtt", folder: "src", license: "/LICENSE"},
{owner: "sapmentors", repo: "abap2xlsx", folder: "src", license: "/LICENSE"},
{owner: "microsoft", repo: "ABAP-SDK-for-Azure", folder: "src", license: "/LICENSE"},
];
for (const r of repos) {
childProcess.execSync("rm -rf " + r.repo, {stdio: "inherit"});
childProcess.execSync("git clone https://github.com/" + r.owner + "/" + r.repo + ".git", {stdio: "inherit"});
childProcess.execSync("rm -rf src/" + r.repo + "", {stdio: "inherit"});
fs.mkdirSync("src/" + r.repo + "");
childProcess.execSync("cp -r " + r.repo + "/" + r.folder + "/* src/" + r.repo + "", {stdio: "inherit"});
childProcess.execSync("cp " + r.repo + r.license + " src/" + r.repo + "", {stdio: "inherit"});
childProcess.execSync("rm -rf " + r.repo + "", {stdio: "inherit"});
}
childProcess.execSync("abaplint -p -f total || true", {stdio: "inherit", });
childProcess.execSync("find -name '*.abap' | xargs cat | wc -l", {stdio: "inherit"});