@@ -24,7 +24,9 @@ checkoutdir="${workdir}/${reponame}"
24
24
resourcedir=" ${HOME} /magical-pony"
25
25
statusfile=' /var/www/html/index.html'
26
26
27
+ rm -rf /srv/old-clones/
27
28
rm -rf " ${checkoutdir} "
29
+
28
30
mkdir -p " ${checkoutdir} "
29
31
30
32
{
@@ -38,9 +40,9 @@ pushd "${checkoutdir}"
38
40
# Get a clean version to avoid any merge/reset weirdness
39
41
git clone " ${repo} " .
40
42
41
- echo " <h2>Branches</h2>" >> " ${statusfile} "
43
+ echo ' <h2>Branches</h2>' >> " ${statusfile} "
42
44
43
- hostnames=" -d legal.creativecommons.org"
45
+ hostnames=' -d legal.creativecommons.org'
44
46
45
47
for branch in ` git branch -a | grep remotes | grep -v HEAD | grep -v master` ;
46
48
do
59
61
perl -p -i -e " s/MAGICALPONY/${branchid} /g" \
60
62
" /etc/apache2/sites-enabled/${branchid} " .conf
61
63
hash=$( git log ${branchname} -1 --format=" %H" )
62
- echo " <h3>${branchid} (${branchname} )</h3><p><b>Commit:</b> <a href=\" https://github.com/creativecommons/creativecommons.org/commit/${hash} \" \>${hash} </a></p>" \
63
- >> " ${statusfile} "
64
+ {
65
+ echo " <h3>${branchid} (${branchname} )</h3>"
66
+ echo ' <p><b>Commit: </b>'
67
+ echo " <a href=\" https://github.com/creativecommons/creativecommons.org/commit/${hash} \" >${hash} </a>"
68
+ echo " </p>"
69
+ } >> " ${statusfile} "
64
70
git log ${branchname} -1 --format=" <p>%s</p>" >> " ${statusfile} "
65
71
done
66
72
75
81
--expand --keep-until-expiring --redirect \
76
82
${certbotargs}
77
83
78
- echo " <h1>And we're done!</h1>" >> " ${statusfile} "
84
+ echo ' <h1>And we are done!</h1>' >> " ${statusfile} "
79
85
80
86
rm -rf /srv/old-clones/
81
87
82
- echo " <h2>" >> " ${statusfile} "
83
- echo ` date` >> " ${statusfile} "
84
- echo " </h2>" >> " ${statusfile} "
88
+ echo " <h2>$( date ' +%A %F %T %:::z %Z' ) </h2>" >> " ${statusfile} "
85
89
86
90
chown www-data:www-data " ${statusfile} "
87
91
0 commit comments