-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Add 10~beta1 #303
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add 10~beta1 #303
Conversation
@@ -9,25 +9,51 @@ if [ ${#versions[@]} -eq 0 ]; then | |||
fi | |||
versions=( "${versions[@]%/}" ) | |||
|
|||
packagesBase='http://apt.postgresql.org/pub/repos/apt/dists/jessie-pgdg' | |||
mainList="$(curl -fsSL "$packagesBase/main/binary-amd64/Packages.bz2" | bunzip2)" | |||
declare -A debianSuite=( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I debated using a default, like golang, but decided it just complicates logic.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So, if/when we get PostgreSQL 11, this will break, won't it? Is the idea just to force us to explicitly reconsider at that point which base we should use?
(Should probably update from set -eo pipefail
to set -Eeuo pipefail
like we've done in several other scripts to help ensure that breakage does occur, and gives a semi-sane error message about an unset variable in debianSuite
.)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes. Break all the things. (adding E
and u
to set
)
Forgot |
update.sh
Outdated
lastSuite="${debianSuite[$version]}" | ||
packagesBase='http://apt.postgresql.org/pub/repos/apt/dists/'"${debianSuite[$version]}"'-pgdg' | ||
mainList="$(curl -fsSL "$packagesBase/main/binary-amd64/Packages.bz2" | bunzip2)" | ||
fi |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
IMO since we don't run this very often, we might as well just ditch the optimization entirely and redownload every time (or use an associative array for cache instead).
update.sh
Outdated
-e 's/%%PG_VERSION%%/'"$fullVersion"'/g' \ | ||
-e 's/%%DEBIAN_SUITE%%/'"${debianSuite[$version]}"'/g' \ | ||
Dockerfile-debian.template > "$version/Dockerfile" | ||
if [ "$version" = '10' ]; then |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would this be safer as something like [ "${version%%.*}" != '9' ]; then
so that we only keep this package on 9.x
for now, rather than removing the package explicitly only for 10
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I wasn't sure if it was a permanent change for 10 to provide contrib or if that was possibly only a change in the beta version. Doing it this way we get the failure on 10.1 when the package still does not exist instead of silently not installing it.
update.sh
Outdated
) | ||
|
||
# TODO figure out what to do with odd version numbers here, like release candidates | ||
srcVersion="${fullVersion%%-*}" | ||
# change "10~beta1" to "10beta1" for ftp urls | ||
srcVersion="${srcVersion//\~/}" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh yummy -- I think some environments break on this, so what we usually do elsewhere is something like this:
tilde='~'
srcVersion="${srcVersion//$tilde/}"
- fail on unset vars so that missing suites on new version gives a more useful error - prevent inconsistent bash handling of tilde in `${variable//~/}` - use associative array for suite to packages.gz cache
Warding off the "where is it?":
|
Fixes #293
Also bump
jessie
tostretch
and alpine3.5
to3.6
for postgres 10. We can discuss separately the bumping of other versions of postgres tostretch
or3.6
.