forked from cms-sw/cms-bot
-
Notifications
You must be signed in to change notification settings - Fork 0
/
ib-rotate-weeks
executable file
·29 lines (26 loc) · 1.4 KB
/
ib-rotate-weeks
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
#!/bin/sh -ex
[ -f ib-weeks ] || exit 1
WEEK_NO="nweek-${CMS_WEEK_NUM}"
WEEK_FOUND=`grep "^$WEEK_NO\$" ib-weeks | wc -l`
if [ "X$WEEK_FOUND" = "X0" ] ; then
rm -rf dummybuild
mkdir dummybuild
pushd dummybuild
ARCHITECTURE=slc6_amd64_gcc530
git clone -b IB/CMSSW_9_0_X/gcc530 git://github.com/cms-sw/cmsdist.git CMSDIST || git clone -b IB/CMSSW_9_0_X/gcc530 https://:@git.cern.ch/kerberos/CMSDIST.git CMSDIST
git clone -b V00-30-XX git://github.com/cms-sw/pkgtools.git PKGTOOLS || git clone -b V00-30-XX https://:@git.cern.ch/kerberos/PKGTOOLS.git PKGTOOLS
if [ $(sh ./CMSDIST/cmsos.file | grep slc7_ | wc -l) -gt 0 ] ; then ARCHITECTURE=slc7_amd64_gcc530 ; fi
echo -e "### RPM cms dummy `date +%s`\n## NOCOMPILER\nSource: none\n%prep\n%build\n%install\n" > CMSDIST/dummy.spec
PKGTOOLS/cmsBuild --debug --repository cms --architecture $ARCHITECTURE --work-dir w build dummy
PKGTOOLS/cmsBuild --debug --repository cms --upload-tmp-repository $CMS_REPOSITORY --architecture $ARCHITECTURE --work-dir w upload dummy
popd
rm -rf dummybuild
echo "$WEEK_NO" >> ib-weeks
git commit -m "Added new ib-week $WEEK_NO" ib-weeks
git pull --rebase
git push origin
echo "ARCHITECTURE=${ARCHITECTURE}" > cvmfs-reset-week
echo "REPOSITORY=cms.${CMS_REPOSITORY}" >> cvmfs-reset-week
echo "RELEASE_FORMAT=" >> cvmfs-reset-week
echo "CMSDIST_HASH=" >> cvmfs-reset-week
fi