Skip to content

Instantly share code, notes, and snippets.

@katapad
Created May 21, 2014 11:43
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save katapad/6da71517aad1321e7599 to your computer and use it in GitHub Desktop.
Save katapad/6da71517aad1321e7599 to your computer and use it in GitHub Desktop.
Gruntでプチバージョン管理♥ぽいアップロードのやりかた ref: http://qiita.com/katapad/items/3ab543904f0bf73d7145
$ grunt testup
# Grunt v0.4.5で動きます
# 日付を作る
# build-versionオプションが設定されてなかったら、いまの時間を設定する
revision = grunt.option('build-version') or grunt.template.today('yyyy-mm-dd_HH-MM-ss')
# アップロードする場所を決める
uploadPath = "hogehoge/assets/#{revision}"
# ~~~~ 中略 ~~~~~
grunt.initConfig
'sftp-deploy':
develop:
auth: hogehoge
src: 'public'
dest: uploadPath
exclusions: ['.DS_Store']
grunt.registerTask 'testup', ['sftp-deploy:develop']
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment