【问题标题】:Trying to make my deploy script work试图让我的部署脚本工作
【发布时间】:2014-06-26 04:19:17
【问题描述】:

我有几个 unix 命令让 git 推送到 heroku,但我有一个问题,我遇到了麻烦。我的 .gitignore 中有凉亭组件,因为它们不应该在仓库中。因此,在自动化步骤中,它会创建一个新分支,删除 .gitignore 并添加用于 Heroku 推送的 bower 文件。不幸的是,在该过程结束时,我没有凉亭目录。如何保存我的 bower 目录?

gulpfile.coffee

gulp.task 'deploy', shell.task [
  'git checkout master'
  'git branch -D dist'
  'git stash'
  'git checkout -b dist'
  'rm .gitignore'
  'git add .gitignore --all'
  'gulp build',
  'git add public'
  'git commit -m "build for release"'
  'git push heroku dist:master --force'
  'git checkout master'
  'git branch -D dist'
  'git stash pop'
  'echo "Deployed."'
  'heroku open'
], ignoreErrors: true

.gitignore

public/components/bower

【问题讨论】:

    标签: git shell unix heroku gulp


    【解决方案1】:

    checkout master 后,在删除dist 分支之前可以做如下操作:

    git checkout dist -- public/components/bower
    git reset
    

    【讨论】:

    • 好电话。我知道结帐,但解决方案是逃避我! :) #brainfreeze
    猜你喜欢
    • 2012-07-28
    • 1970-01-01
    • 2021-10-22
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2022-08-15
    相关资源
    最近更新 更多