Debian Codegraph @

maven-scm-plugin/src/it/scm-741-validate-scm-url-matches-working-copy/prepare.groovy

raw
1 /*
2 * Licensed to the Apache Software Foundation (ASF) under one
3 * or more contributor license agreements. See the NOTICE file
4 * distributed with this work for additional information
5 * regarding copyright ownership. The ASF licenses this file
6 * to you under the Apache License, Version 2.0 (the
7 * "License"); you may not use this file except in compliance
8 * with the License. You may obtain a copy of the License at
9 *
10 * http://www.apache.org/licenses/LICENSE-2.0
11 *
12 * Unless required by applicable law or agreed to in writing,
13 * software distributed under the License is distributed on an
14 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15 * KIND, either express or implied. See the License for the
16 * specific language governing permissions and limitations
17 * under the License.
18 */
19
20 // We rename the dotSvnDir in the IT folder to standard .svn naming so that the IT can execute.
21 // BUT we actually don't store that special versioning directory as-is to prevent potentially confusing
22 // (to say the least) a svn checkout of the maven-scm project.
23 //
24
25 println "prepare.groovy:"
26 File dotSvnDir = new File( basedir, 'dotSvnDir' )
27 assert dotSvnDir.exists()
28 assert dotSvnDir.isDirectory()
29 assert dotSvnDir.renameTo( new File( basedir, '.svn' ) )
30
31 println "svn --version"
32 def proc = "svn --version".execute()
33 proc.consumeProcessOutput()
34 proc.waitFor()
35 println "return code: ${ proc.exitValue()}"
36 println "stderr: ${proc.err.text}"
37 println "stdout: ${proc.in.text}"
38
39 println "svn upgrade $basedir"
40 proc = ["svn", "upgrade", "$basedir"].execute()
41 proc.consumeProcessOutput()
42 proc.waitFor()
43 println "return code: ${ proc.exitValue()}"
44 println "stderr: ${proc.err.text}"
45 println "stdout: ${proc.in.text}"