Skip to content

Commit

Permalink
nanoc environments \o/
Browse files Browse the repository at this point in the history
  • Loading branch information
werthen committed Nov 21, 2016
1 parent 513a60f commit fd35397
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 13 deletions.
6 changes: 3 additions & 3 deletions .travis.yml
Expand Up @@ -14,9 +14,9 @@ before_install:
- echo -e "Host zeus.ugent.be\n\tStrictHostKeyChecking no\n" >> ~/.ssh/config
- npm install
script:
- ZEUS_PRODUCTION=1 bundle exec nanoc
- ZEUS_PRODUCTION=1 bundle exec nanoc check --deploy
- bundle exec nanoc --env=prod
- bundle exec nanoc --env=prod check --deploy
after_success:
- mv deploy_key ~/.ssh/id_rsa
- chmod 600 ~/.ssh/id_rsa
- '[[ $TRAVIS_PULL_REQUEST == "false" ]] && [[ $TRAVIS_BRANCH == "master" ]] && ZEUS_PRODUCTION=1 bundle exec nanoc deploy public'
- '[[ $TRAVIS_PULL_REQUEST == "false" ]] && [[ $TRAVIS_BRANCH == "master" ]] && bundle exec nanoc --env=prod deploy public'
2 changes: 1 addition & 1 deletion Gemfile
@@ -1,7 +1,7 @@
# frozen_string_literal: true
source 'https://rubygems.org'

gem 'nanoc', '4.3.7'
gem 'nanoc', '4.4.1'
gem 'kramdown'
gem 'coffee-script'
gem 'sass'
Expand Down
14 changes: 7 additions & 7 deletions Gemfile.lock
Expand Up @@ -3,7 +3,7 @@ GEM
specs:
adsf (1.2.1)
rack (>= 1.0.0)
autoprefixer-rails (6.5.1.1)
autoprefixer-rails (6.5.3)
execjs
builder (3.2.2)
coderay (1.1.1)
Expand All @@ -28,25 +28,25 @@ GEM
shellany (~> 0.0)
thor (>= 0.18.1)
guard-compat (1.2.1)
guard-nanoc (2.1.0)
guard-nanoc (2.1.1)
guard (~> 2.8)
guard-compat (~> 1.0)
nanoc (~> 4.0)
nanoc (>= 4.3.8, < 5.0)
hamster (3.0.0)
concurrent-ruby (~> 1.0)
highline (1.7.8)
icalendar (2.4.1)
json (2.0.2)
kramdown (1.12.0)
libv8 (3.16.14.15)
kramdown (1.13.0)
libv8 (3.16.14.17)
listen (3.1.5)
rb-fsevent (~> 0.9, >= 0.9.4)
rb-inotify (~> 0.9, >= 0.9.7)
ruby_dep (~> 1.2)
lumberjack (1.0.10)
method_source (0.8.2)
mini_portile2 (2.1.0)
nanoc (4.3.7)
nanoc (4.4.1)
cri (~> 2.3)
hamster (~> 3.0)
parallel (~> 1.9)
Expand Down Expand Up @@ -93,7 +93,7 @@ DEPENDENCIES
highline
icalendar
kramdown
nanoc (= 4.3.7)
nanoc (= 4.4.1)
sass
terminal-notifier-guard
therubyracer
Expand Down
2 changes: 1 addition & 1 deletion lib/helpers/environment.rb
@@ -1,6 +1,6 @@
module EnvironmentHelper
def production?
ENV['ZEUS_PRODUCTION']
ENV['NANOC_ENV'] == 'prod'
end

def development?
Expand Down
6 changes: 5 additions & 1 deletion nanoc.yaml
Expand Up @@ -3,7 +3,11 @@ title: Zeus WPI
author_name: ''
author_uri: ''

base_url: https://zeus.ugent.be
base_url: http://localhost:3000

environments:
prod:
base_url: https://zeus.ugent.be

# The syntax to use for patterns in the Rules file. Can be either `"glob"`
# (default) or `"legacy"`. The former will enable glob patterns, which behave
Expand Down

0 comments on commit fd35397

Please sign in to comment.