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

Commit

Permalink
Introduce release artifacts.
Browse files Browse the repository at this point in the history
  • Loading branch information
marc0der committed Jan 16, 2018
1 parent c5f37dc commit ccdef49
Show file tree
Hide file tree
Showing 5 changed files with 65 additions and 1 deletion.
21 changes: 21 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
sudo: required
services:
- docker
language: java
before_install:
- docker login -u="$DOCKER_USERNAME" -p="$DOCKER_PASSWORD"
- docker run -d --net=host mongo:latest
script:
- docker build -t sdkman/sdkman-website:1.0.0-SNAPSHOT .
- docker run -d --env="RATPACK_MONGO__HOST=localhost" --net=host sdkman/sdkman-website:1.0.0-SNAPSHOT
- "./gradlew check --stacktrace"
after_success:
- docker push sdkman/sdkman-website:1.0.0-SNAPSHOT
cache:
directories:
- "$HOME/.gradle"
# blacklist
branches:
except:
- RELEASE

9 changes: 9 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
FROM java:8

MAINTAINER Marco Vermeulen

RUN mkdir /website

ADD build/libs /website

ENTRYPOINT java -Xmx128m -jar /broker/sdkman-website-1.0.0-SNAPSHOT-all.jar
33 changes: 33 additions & 0 deletions bin/release.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
#!/bin/bash

VERSION="$1"
BRANCH="RELEASE"

#sanity
if [[ -z "$VERSION" ]]; then
echo "Usage: release.sh <version>"
exit 0
fi

#prepare branch
git checkout master
git branch -D "$BRANCH"
git checkout -b "$BRANCH"

#update version
for file in "gradle.properties" ".travis.yml" "Dockerfile"; do
sed -i "s/1.0.0-SNAPSHOT/$VERSION/g" "$file"
git add "$file"
done

git commit -m "Update version of $BRANCH to $VERSION"

#push branch
git push -f origin "$BRANCH:$BRANCH"

#push tag
git tag "$VERSION"
git push origin "$VERSION"

#back to master branch
git checkout master
1 change: 1 addition & 0 deletions gradle.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
version=1.0.0-SNAPSHOT
2 changes: 1 addition & 1 deletion src/ratpack/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -239,7 +239,7 @@ <h3>Corporate Enterprises</h3>
<h4 class="modal-title" id="myModalLabel">Get in touch!</h4>
</div>
<div class="modal-body">
<form>
<form action="/contact">
<div class="form-group">
<input type="text" class="form-control" id="name" name="name" placeholder="Name">
</div>
Expand Down

0 comments on commit ccdef49

Please sign in to comment.