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

Commit

Permalink
Sync changes from upstream repository
Browse files Browse the repository at this point in the history
  • Loading branch information
Hubot committed Aug 2, 2016
1 parent 00da7b8 commit c0f8242
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 2 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@
!/assets/vendor/lunr.js/lunr.js
!/assets/vendor/lunr.js/lunr.min.js

_site/
enterprise/
output
tmp
.DS_Store
Expand Down
7 changes: 7 additions & 0 deletions Rakefile
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,10 @@ task :build do
end
end

task :build_latest_ent do
puts sh "script/enterprise-backport #{config[:versions].first} --keep"
end

desc "Test the output"
task :test => [:remove_tmp_dir, :remove_output_dir, :build] do
Rake::Task['spec'].invoke
Expand Down Expand Up @@ -80,6 +84,9 @@ end
namespace :assets do
task :precompile => [:build] do
sh 'mv output _site/'
Rake::Task['build_latest_ent'].invoke
sh "mkdir -p _site/enterprise/#{config[:versions].first}"
sh "mv output/* _site/enterprise/#{config[:versions].first}"
end
end

Expand Down
2 changes: 1 addition & 1 deletion script/enterprise-backport
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ data_variables:
Nanoc::Int::SiteLoader.new.new_with_config(versioned_config).compile

puts `node_modules/gulp/bin/gulp.js assets`
fail unless $CHILD_STATUS.to_i == 0
raise unless $CHILD_STATUS.to_i == 0

versioned_config
end
Expand Down
2 changes: 1 addition & 1 deletion tasks/utils.rake
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
require 'yaml'
require 'json'
require 'active_support/core_ext/hash'

Expand All @@ -8,4 +9,3 @@ end
def symbolize_hash(hash)
hash.deep_symbolize_keys
end

4 changes: 4 additions & 0 deletions tasks/versioning.rake
Original file line number Diff line number Diff line change
Expand Up @@ -131,3 +131,7 @@ def cleanup
FileUtils.rm_rf "#{VERSIONED_ENT_PATH}/assets/vendor"
FileUtils.rm_rf "#{VERSIONED_ENT_PATH}/assets/images"
end

def keep?
ARGV.include?('--keep')
end

0 comments on commit c0f8242

Please sign in to comment.