blob: 0ba168467c82d7ce3d8e20368f56abc764c2fd5b (
plain)
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
|
# (c) 2016 Jan-Simon Moeller dl9pf(at)gmx.de
# License GPLv2
################################################################################
## Select what to build / inject the rev from the gerrit env variable
################################################################################
HANDLED="no"
# Projects in AGL/*
###################
if [[ ! x"yes" = x"$HANDLED" ]] && $(echo "$TARGETPROJECT" | grep -q "^AGL/"); then
MYPROJECT=`echo $TARGETPROJECT | sed -e "s#AGL/##g"`
if test x"AGL-repo" = x"$MYPROJECT" ; then
cd .repo/manifests
MYREMOTE=`git remote | head -1`
git fetch ${MYREMOTE} ${TARGETREFSPEC}
git reset --hard FETCH_HEAD
cd ../../
repo sync --force-sync -d
else
if test -n "${GERRIT_CHANGE_NUMBER}" -a -n "${GERRIT_PATCHSET_NUMBER}" ; then
repo download $MYPROJECT ${GERRIT_CHANGE_NUMBER}/${GERRIT_PATCHSET_NUMBER}
else
cd $MYPROJECT
MYREMOTE=`git remote | head -1`
git fetch ${MYREMOTE} ${TARGETREFSPEC}
git reset --hard FETCH_HEAD
cd ..
fi
fi
HANDLED="yes"
fi
# Projects in src/*
###################
if [[ ! x"yes" = x"$HANDLED" ]] && $(echo "$TARGETPROJECT" | grep -q "^src/"); then
MYPROJECT=`echo $TARGETPROJECT | sed -e "s#src/##g"`
# We need to set the refspec in the recipe.
# Therefore each src/* must have a .aglrecipe file with the location
# relative to a repo clone
# e.g. ./meta-agl/meta-agl/recipes-graphics/wayland/foo.bb
#
# Also there must be a SRCREV tag which we can manipulate.
#
#
echo "Not implemented"
exit 0
fi
# Projects in staging/*
#######################
if [[ ! x"yes" = x"$HANDLED" ]] && $(echo "$TARGETPROJECT" | grep -q "^staging/"); then
MYPROJECT=`echo $TARGETPROJECT | sed -e "s#staging/##g"`
# We need to set the refspec in the recipe.
# Therefore each src/* must have a .aglrecipe file with the location
# relative to a repo clone
# e.g. ./meta-agl/meta-agl/recipes-graphics/wayland/foo.bb
#
# Also there must be a SRCREV tag which we can manipulate.
#
#
echo "Not implemented"
exit 0
fi
if [[ ! x"yes" = x"$HANDLED" ]] ; then
echo "COULD NOT SELECT PROJECT, something is wrong!"
echo "$TARGETPROJECT"
echo ""
set
exit 1
fi
repo manifest -r
repo manifest -r > ../current_default.xml
|