forked from jhipster/prettier-java
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathclone-samples.js
More file actions
103 lines (97 loc) · 2.38 KB
/
clone-samples.js
File metadata and controls
103 lines (97 loc) · 2.38 KB
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
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
/* eslint-disable no-console */
"use strict";
const cp = require("child_process");
const path = require("path");
const fs = require("fs-extra");
const samplesDir = path.resolve(__dirname, "../samples");
const sampleRepos = [
{
repoUrl: "https://github.com/iluwatar/java-design-patterns.git",
branch: "1.20.0"
},
{
repoUrl: "https://github.com/spring-projects/spring-boot.git",
branch: "v2.1.0.RELEASE"
},
{
repoUrl: "https://github.com/google/guava.git",
branch: "v27.0.1"
},
{
repoUrl: "https://github.com/spring-projects/spring-framework.git",
branch: "v5.1.5.RELEASE"
},
{
repoUrl: "https://github.com/jhipster/jhipster",
branch: "main"
},
{
repoUrl: "https://github.com/jhipster/jhipster-sample-app",
branch: "main"
},
{
repoUrl: "https://github.com/jhipster/jhipster-online",
branch: "main"
},
{
repoUrl: "https://github.com/jhipster/jhipster-sample-app-microservice",
branch: "main"
},
{
repoUrl: "https://github.com/jhipster/jhipster-sample-app-oauth2",
branch: "main"
},
{
repoUrl: "https://github.com/jhipster/jhipster-sample-app-websocket",
branch: "main"
},
{
repoUrl: "https://github.com/jhipster/jhipster-sample-app-noi18n",
branch: "main"
},
{
repoUrl: "https://github.com/jhipster/jhipster-sample-app-nocache",
branch: "main"
},
{
repoUrl: "https://github.com/jhipster/jhipster-sample-app-hazelcast",
branch: "main"
},
{
repoUrl: "https://github.com/jhipster/jhipster-sample-app-elasticsearch",
branch: "main"
},
{
repoUrl: "https://github.com/jhipster/jhipster-sample-app-dto",
branch: "main"
},
{
repoUrl: "https://github.com/jhipster/jhipster-sample-app-cassandra",
branch: "main"
},
{
repoUrl: "https://github.com/jhipster/jhipster-sample-app-mongodb",
branch: "main"
},
{
repoUrl: "https://github.com/jhipster/jhipster-sample-app-gradle",
branch: "main"
},
{
repoUrl: "https://github.com/jhipster/jhipster-sample-app-react",
branch: "main"
},
{
repoUrl: "https://github.com/nipafx/demo-java-x",
branch: "main"
}
];
fs.emptyDirSync(samplesDir);
sampleRepos.forEach(cloneRepo);
function cloneRepo({ repoUrl, branch }) {
console.log(`cloning ${repoUrl}`);
cp.execSync(`git clone ${repoUrl} --branch ${branch} --depth 1`, {
cwd: samplesDir,
stdio: [0, 1, 2]
});
}