-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #3590 from consul/add_upgrade_task
Add task to upgrade to a new release
- Loading branch information
Showing
9 changed files
with
59 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
class ApplicationLogger | ||
def info(message) | ||
logger.info(message) | ||
end | ||
|
||
def logger | ||
@logger ||= Logger.new(STDOUT).tap do |logger| | ||
logger.formatter = proc { |severity, _datetime, _progname, msg| "#{severity} #{msg}\n" } | ||
end | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
namespace :consul do | ||
desc "Runs tasks needed to upgrade to the latest version" | ||
task execute_release_tasks: "execute_release_1.0.0_tasks" | ||
|
||
desc "Runs tasks needed to upgrade from 1.0.0-beta to 1.0.0" | ||
task "execute_release_1.0.0_tasks": [ | ||
"poll:generate_slugs", | ||
"stats_and_results:migrate_to_reports", | ||
"budgets:calculate_ballot_lines", | ||
"settings:remove_deprecated_settings", | ||
"stats:generate" | ||
] | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,7 @@ | ||
namespace :stats_and_results do | ||
desc "Migrates stats_enabled and results_enabled data to enabled reports" | ||
task migrate_to_reports: :environment do | ||
ApplicationLogger.new.info "Migrating stats and results" | ||
Migrations::Reports.new.migrate | ||
end | ||
end |