-
Notifications
You must be signed in to change notification settings - Fork 19
/
Copy pathadd-new-release-batch
executable file
·39 lines (35 loc) · 1.32 KB
/
add-new-release-batch
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
#!/bin/bash -e
#
# Add new release support including new bundles, updates to config.yaml,
# charmcraft.yaml, tests.yaml, osci.yaml, and .zuul.yaml using the
# add-new-release-single helper.
charms=$(cd charms && ls -d1 *)
basedir="$(pwd)"
prev_series_bundle=$1
prev_uca_bundle=$2
new_series_bundle=$3
new_uca_bundle=$4
prev_ubuntu_version=$5
new_ubuntu_version=$6
prev_ubuntu_series=$7
new_ubuntu_series=$8
usage="usage: add-new-release-batch prev-series-bundle prev-uca-bundle
new-series-bundle new-uca-bundle prev-ubuntu-version new-ubuntu-version
prev-ubuntu-series new-ubuntu-series"
example="example: add-new-release-batch lunar-antelope.yaml jammy-antelope.yaml
mantic-bobcat.yaml jammy-bobcat.yaml 23.04 23.10 lunar mantic"
if [[ -z "$prev_series_bundle" || -z "$prev_uca_bundle" || \
-z "$new_series_bundle" || -z "$new_uca_bundle" || \
-z "$prev_ubuntu_version" || -z "$new_ubuntu_version" || \
-z "$prev_ubuntu_series" || -z "$new_ubuntu_series" ]]; then
echo $usage
echo $example
exit 1
fi
for charm in $charms; do
echo "===== $charm ====="
cd $basedir/charms/$charm
$basedir/add-new-release-single $prev_series_bundle $prev_uca_bundle \
$new_series_bundle $new_uca_bundle $prev_ubuntu_version \
$new_ubuntu_version $prev_ubuntu_series $new_ubuntu_series
done