Skip to content

Commit

Permalink
Separate CI preparations for build and deploy jobs
Browse files Browse the repository at this point in the history
  • Loading branch information
Jakob Holderbaum committed Sep 10, 2019
1 parent 265b5cc commit 9bbed2d
Showing 1 changed file with 23 additions and 9 deletions.
32 changes: 23 additions & 9 deletions do
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,27 @@ function prepare_ci {
if [[ -z "${CI:=}" ]]; then return 0; fi

apt-get update
apt-get \
install \
-y \
ruby \
ruby-dev \
build-essential \
lftp

if [ $1 = 'build' ];
then
apt-get \
install \
-y \
ruby \
ruby-dev \
build-essential \
zlib1g-dev \
nodejs
fi

if [ $1 = 'deploy' ];
then
apt-get \
install \
-y \
lftp
fi

}

task_serve() {
Expand All @@ -32,7 +46,7 @@ task_serve() {
}

task_build() {
prepare_ci
prepare_ci build
ensure_ruby

./vendor/bin/middleman build
Expand Down Expand Up @@ -63,7 +77,7 @@ task_update_event_data() {
}

task_deploy() {
prepare_ci
prepare_ci deploy

lftp \
-c " \
Expand Down

0 comments on commit 9bbed2d

Please sign in to comment.