Commit a0698c0 1 parent 1de7fb3 commit a0698c0 Copy full SHA for a0698c0
File tree 1 file changed +18
-6
lines changed
packages/prettier-plugin-java/scripts
1 file changed +18
-6
lines changed Original file line number Diff line number Diff line change @@ -48,7 +48,8 @@ const jhipster1 = [
48
48
} ,
49
49
{
50
50
repoUrl : "https://github.com/jhipster/jhipster-sample-app-nocache" ,
51
- branch : "main"
51
+ branch : "main" ,
52
+ commitHash : "fda6dee77651042083780c812a1a54ff2de8da47"
52
53
} ,
53
54
{
54
55
repoUrl : "https://github.com/jhipster/jhipster-sample-app-hazelcast" ,
@@ -97,10 +98,21 @@ fs.emptyDirSync(samplesDir);
97
98
98
99
sampleRepos . forEach ( cloneRepo ) ;
99
100
100
- function cloneRepo ( { repoUrl, branch } ) {
101
+ function cloneRepo ( { repoUrl, branch, commitHash } ) {
101
102
console . log ( `cloning ${ repoUrl } ` ) ;
102
- cp . execSync ( `git clone ${ repoUrl } --branch ${ branch } --depth 1` , {
103
- cwd : samplesDir ,
104
- stdio : [ 0 , 1 , 2 ]
105
- } ) ;
103
+ if ( commitHash ) {
104
+ cp . execSync ( `git clone ${ repoUrl } --branch ${ branch } ` , {
105
+ cwd : samplesDir ,
106
+ stdio : [ 0 , 1 , 2 ]
107
+ } ) ;
108
+ cp . execSync ( `git checkout ${ commitHash } ` , {
109
+ cwd : path . resolve ( samplesDir , repoUrl . split ( "/" ) . pop ( ) ) ,
110
+ stdio : [ 0 , 1 , 2 ]
111
+ } ) ;
112
+ } else {
113
+ cp . execSync ( `git clone ${ repoUrl } --branch ${ branch } --depth 1` , {
114
+ cwd : samplesDir ,
115
+ stdio : [ 0 , 1 , 2 ]
116
+ } ) ;
117
+ }
106
118
}
You can’t perform that action at this time.
0 commit comments