1
0
Fork 0

removed git checkout script

on the SSD Jenkins is fast enough
This commit is contained in:
Christian Kühnel 2019-12-20 09:07:05 +00:00
parent 67f6d1d48d
commit bf1bcb951f
2 changed files with 0 additions and 33 deletions

View file

@ -37,7 +37,6 @@ pipeline {
git url: 'https://github.com/google/llvm-premerge-checks.git' git url: 'https://github.com/google/llvm-premerge-checks.git'
} }
echo "getting llvm-project... " echo "getting llvm-project... "
//powershell "${SCRIPT_DIR}/git_checkout.ps1"
dir("llvm-project") dir("llvm-project")
{ {
git url: 'https://github.com/llvm/llvm-project.git' git url: 'https://github.com/llvm/llvm-project.git'

View file

@ -1,32 +0,0 @@
# Copyright 2019 Google LLC
# Licensed under the the Apache License v2.0 with LLVM Exceptions (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
# https://llvm.org/LICENSE.txt
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
. ${PSScriptRoot}\common.ps1
if (Test-Path -PathType Container "llvm-project"){
Set-Location llvm-project
Write-Output "performing git pull..."
$branch = (git branch) | Out-String
$branch = ($branch -split '\r')[0]
if ($branch -ne "* master"){
Invoke-Call -ScriptBlock { git checkout master}
}
Invoke-Call -ScriptBlock { git reset --hard }
Invoke-Call -ScriptBlock { git clean -fdx }
Invoke-Call -ScriptBlock { git pull -q }
# TODO: in case of errors: delete folder and clone
} else {
Write-Output "performing git clone..."
Invoke-Call -ScriptBlock { git clone -q --depth 1 https://github.com/llvm/llvm-project }
}