Sha256: 2691907d06cbb68c06a7f3a869c7d3cf95dbc75044813569b75091719cadf9b3
Contents?: true
Size: 1.9 KB
Versions: 6
Compression:
Stored size: 1.9 KB
Contents
require 'bundler' require 'fileutils' $:.push File.expand_path("../lib", __FILE__) require "smock/version" Bundler::GemHelper.install_tasks task :default => :build_version desc "clean up" task :clean do sh "rm -rf tmp versions" end desc "test stuff" task :test do FileUtils.mkdir_p "./tmp/" sh "bundle exec sass -l ./app/assets/stylesheets/smock.sass tmp/output.css" end desc "build a version of smock ready for deploy" task :build_version => :clean do target = "./versions/#{Smock::VERSION}" FileUtils.mkdir_p target sh "bundle exec sass --precision 7 ./app/assets/stylesheets/smock.sass #{target}/smock.css" sh "bundle exec sass --precision 7 ./app/assets/stylesheets/smock.sass #{target}/smock.min.css --style compressed" sh "bundle exec sass --precision 7 ./app/assets/stylesheets/svg_images.sass #{target}/svg_images.css" sh "bundle exec sass --precision 7 ./app/assets/stylesheets/svg_images.sass #{target}/svg_images.min.css --style compressed" sh "ln -s $(pwd)/examples #{target}/examples" latest = "./versions/latest" FileUtils.mkdir_p latest sh "cp -R #{target}/* #{latest}/" sh "bundle exec sass ./guide.sass #{latest}/guide.css" sh "cp ./index.html #{latest}/" end desc "run a sass watcher" task :sasswatch => :build_version do sh "bundle exec sass --watch app/assets/stylesheets/smock.sass:./versions/smock.css" end desc "deploy to S3 (Depends on the AWS CLI being available)" task :deploy_to_aws do if ENV["SNAP_BRANCH"] == 'master' sh "aws s3 sync versions/latest s3://studio-app.envato.com/smock/latest --delete --recursive --cache-control 'max-age=0, must-revalidate'" sh "aws s3 sync versions s3://studio-app.envato.com/smock" else puts "Not on master. Refusing to deploy to S3" end end desc "publish ruby gem" task :release_gem do if ENV["SNAP_BRANCH"] == 'master' sh "gem push pkg/*.gem" else puts "Not on master. Refusing to publish a gem" end end
Version data entries
6 entries across 6 versions & 1 rubygems
Version | Path |
---|---|
smock-0.1.90 | Rakefile |
smock-0.1.89 | Rakefile |
smock-0.1.88 | Rakefile |
smock-0.1.87 | Rakefile |
smock-0.1.86 | Rakefile |
smock-0.1.85 | Rakefile |