-
Notifications
You must be signed in to change notification settings - Fork 17
/
elixirFeed.sh
executable file
·62 lines (50 loc) · 1.97 KB
/
elixirFeed.sh
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
#!/usr/bin/env bash
vers=()
if [ -f shared/automated-updates.sh ]; then
source shared/automated-updates.sh
else
echo "Check if submodule was loaded; automated-updates.sh is missing"
exit 1
fi
# Keep a record of the min / "max" supported Erlang/OTP versions for each release of Elixir
# e.g. https://hexdocs.pm/elixir/1.17.0/compatibility-and-deprecations.html#between-elixir-and-erlang-otp
declare -A minSupportedErlang
minSupportedErlang["1.17"]="25"
minSupportedErlang["1.16"]="24"
minSupportedErlang["1.15"]="24"
minSupportedErlang["1.14"]="23"
declare -A maxSupportedErlang
maxSupportedErlang["1.17"]="27"
maxSupportedErlang["1.16"]="26"
maxSupportedErlang["1.15"]="26"
maxSupportedErlang["1.14"]="26" # from 1.14.5
# We keep three major Erlang versions at all times and we want to make sure the latest
# version is included, so we source the manifest for the parentTag
source manifest
getElixirVersion() {
RSS_URL="https://github.com/elixir-lang/elixir/tags.atom"
VERSIONS=$(curl --silent "$RSS_URL" | grep -E '(title)' | tail -n +2 | sed -e 's/^[ \t]*//' | sed -e 's/<title>//' -e 's/<\/title>//')
# A minor version is released every 6 months, meaning we do not need to concern ourselves
# with multiple mainline versions like node e.g 16, 18, 19, therefore, we are a bit more
# confident knowing that the latest version will be the first version parsed
for version in $VERSIONS; do
if [[ $version =~ ^v[0-9]+(\.[0-9]+)*$ ]]; then
generateVersions "$(cut -d 'v' -f2 <<< "${version}")"
echo $newVersions hi
generateSearchTerms "ELIXIR_VERSION=" "$majorMinor/${parentTags[2]}/Dockerfile"
directoryCheck "$majorMinor" "$SEARCH_TERM"
if [[ $(eval echo $?) == 0 ]]; then
generateVersionString "$newVersion"
fi
fi
done
}
getElixirVersion
if [ -n "${vers[*]}" ]; then
echo "Included version updates: ${vers[*]}"
echo "Running release script"
./shared/release.sh "${vers[@]}"
else
echo "No new version updates"
exit 0
fi