Skip to content

Commit

Permalink
Rakeタスクをステージング環境に限定
Browse files Browse the repository at this point in the history
  • Loading branch information
kaisumi committed Feb 10, 2022
1 parent bd9f3ab commit fcbe090
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions lib/tasks/bootcamp.rake
Original file line number Diff line number Diff line change
Expand Up @@ -40,9 +40,11 @@ namespace :bootcamp do

User.all.each(&:create_talk!)

Article.where(wip: false).where(published_at: nil).find_each do |article|
article.published_at = article.created_at
article.save!(validate: false)
if ENV['DB_NAME'] == 'bootcamp_staging'
Article.where(wip: false).where(published_at: nil).find_each do |article|
article.published_at = article.created_at
article.save!(validate: false)
end
end

puts '== END Cloud Build Task =='
Expand Down

0 comments on commit fcbe090

Please sign in to comment.