-
Notifications
You must be signed in to change notification settings - Fork 19
/
_update-rebuild
executable file
·30 lines (26 loc) · 1.02 KB
/
_update-rebuild
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/bash -e
# Sync charm-helpers and ceph helpers where applicable. Assumes git clones
# have already been performed. Does not commit, push, or submit/review.
# See `batch-example` for usage as a batch of charm updates.
charms=$(cd charms && ls -d1 *)
for charm in $charms; do
charm_type="$(./what-is charms/$charm)"
echo "===== $charm ($charm_type) ====="
(
# Do a charm-helpers sync where possible
cd "charms/$charm"
case $charm_type in
source-zaza)
# update/add the rebuild file to trigger a rebuild
uuid=$(uuid)
echo -e "# This file is used to trigger rebuilds\n# when dependencies of the charm change,\n# but nothing in the charm needs to.\n# simply change the uuid to something new\n$uuid" > ./rebuild
;;
classic-zaza)
echo "NOOP on $charm as it is a classic charm."
;;
*)
echo "UNKNOWN TYPE" && exit 1
;;
esac
)
done