Skip to content

Changed the php version back to 5.6 for Nextcloud 9 and 10#42

Merged
pierreozoux merged 2 commits intonextcloud:masterfrom
tilosp-docker:php5.6
Mar 13, 2017
Merged

Changed the php version back to 5.6 for Nextcloud 9 and 10#42
pierreozoux merged 2 commits intonextcloud:masterfrom
tilosp-docker:php5.6

Conversation

@tilosp
Copy link
Member

@tilosp tilosp commented Mar 3, 2017

Closes #40

update.sh Outdated
# Create the version+variant directory with a Dockerfile.
mkdir -p "$version/$variant"
cp Dockerfile.template "$version/$variant/Dockerfile"
if [ "$version" == "11.0" ]; then
Copy link
Member

@cyphar cyphar Mar 7, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is not really a future-compatible change. I would recommend defining a function like this:

# version_gte A B returns whether A >= B
function version_gte() {
	[[ "$(printf '%s\n' "$@" | sort -V | head -n1)" != "$1" || "$1" == "$2" ]];
}

Which you could then use like this:

template="Dockerfile.template"
if version_gte "$version" "11.0"; then
    template="Dockerfile-php7.template"
fi
cp "$template" "$version/$variant/Dockerfile"

@pierreozoux
Copy link
Member

Thanks a lot @tilosp for this, this is amazing, I'll merge it right away.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants