~armagetronad-dev/armagetronad/0.2.8-armagetronad-work

« back to all changes in this revision

Viewing changes to docker/scripts/fix_gits.sh

  • Committer: Manuel Moos (From GitLab CI)
  • Date: 2020-06-01 08:21:51 UTC
  • mfrom: (1166.1.98 master)
  • Revision ID: z-man@users.sf.net-20200601082151-qludv3x0h9uz2c9x
Merge CI system from 0.2.8.3 with adaptions

Adaptions:
Bump docker label versions
Switch release track to CURRENT

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#!/bin/bash
 
2
wd=`dirname $0`
 
3
download_dir="${wd}/.cache/gits"
 
4
 
 
5
function fix_git(){
 
6
    name=$1
 
7
    rev=$2    
 
8
 
 
9
    dir=${download_dir}/${name}
 
10
    if ! git -C ${dir} reset ${rev} --hard; then
 
11
        git -C ${dir} fetch
 
12
        git -C ${dir} reset ${rev} --hard || return $?
 
13
    fi
 
14
}
 
15
 
 
16
function fix_gits(){
 
17
    ${wd}/ensure_gits.sh legacy_0.2.8.3 || return $?
 
18
 
 
19
    set -x
 
20
 
 
21
    fix_git winlibs d03e20bf8973a6cbd1e0ecb47dd8333c5614b139 || return $?
 
22
    fix_git codeblocks 4a51998b7f12723c40cca3e2558da3ab8af85814 || return $?
 
23
    fix_git ubuntu aa14f9e1987239b890faa49ea03a32a2dbaa8af7 || return $?
 
24
}
 
25
 
 
26
if ! fix_gits; then
 
27
    # clean and retry on error
 
28
    rm -rf ${download_dir}
 
29
    fix_gits || exit $?
 
30
fi