Skip to content
This repository has been archived by the owner on Nov 19, 2024. It is now read-only.

Commit

Permalink
Build update: actually require dev-branch or tag being built
Browse files Browse the repository at this point in the history
  • Loading branch information
Sven Speckmaier committed Jun 29, 2018
1 parent c7cf2cf commit 5c1b4cb
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
5 changes: 5 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,13 @@ WORKDIR /opt/rancherize

# install composer packages
RUN cd /opt/rancherize-package \
&& CURRENT_BRANCH=$(git rev-parse --abbrev-ref HEAD) \
&& if [ "${CURRENT_BRANCH}" = "HEAD" ] ; then CURRENT_TAG=$(git describe --tags) ; fi \
&& TARGET_VERSION="dev-${CURRENT_BRANCH} as 2.99.9" \
&& if [ ! -z "${CURRENT_TAG}" ] ; then TARGET_VERSION=$(git describe --tags) ; fi \
&& (git fetch --unshallow origin || echo "Not a shallow repository, continuing without fetch") \
&& cd /opt/rancherize \
&& sed -i "s/%TARGET_VERSION%/${TARGET_VERSION}/" composer.json \
&& curl -sSL "https://gist.githubusercontent.com/justb81/1006b89e41e41e1c848fe91969af7a0b/raw/c12faf968e659356ec1cb53f313e7f8383836be3/getcomposer.sh" | sh \
&& COMPOSER_ALLOW_SUPERUSER=1 ./composer.phar install \
&& rm composer.phar
Expand Down
2 changes: 1 addition & 1 deletion docker/composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
}
],
"require": {
"ipunkt/rancherize": "dev-master as 2.99.9",
"ipunkt/rancherize": "%TARGET_VERSION%",
"ipunkt/rancherize-backup-storagebox": "^1.0.1",
"ipunkt/rancherize-ecr": "^1.0.0",
"ipunkt/rancherize-publish-traefik-rancher": "^1.0.1",
Expand Down

0 comments on commit 5c1b4cb

Please sign in to comment.