summaryrefslogtreecommitdiff
path: root/lib/tasks/gitlab/import_export.rake
diff options
context:
space:
mode:
authorYorick Peterse <yorickpeterse@gmail.com>2017-08-30 15:38:16 +0200
committerYorick Peterse <yorickpeterse@gmail.com>2017-09-06 16:40:31 +0200
commit235b105c917c16ab14a79ba13280aff4fd9f1cf9 (patch)
tree27bfe7e1ff2e4caacbdc4450e510164771b66c19 /lib/tasks/gitlab/import_export.rake
parent1632ffa6ad16738994122f0e84f331d50f220879 (diff)
downloadgitlab-ce-235b105c917c16ab14a79ba13280aff4fd9f1cf9.tar.gz
Finish migration to the new events setupevents-migration-cleanup
This finishes the procedure for migrating events from the old format into the new format. Code no longer uses the old setup and the database tables used during the migration process are swapped, with the old table being dropped. While the database migration can be reversed this will 1) take a lot of time as data has to be coped around 2) won't restore data in the "events.data" column as we have no way of restoring this. Fixes https://gitlab.com/gitlab-org/gitlab-ce/issues/37241
Diffstat (limited to 'lib/tasks/gitlab/import_export.rake')
-rw-r--r--lib/tasks/gitlab/import_export.rake11
1 files changed, 11 insertions, 0 deletions
diff --git a/lib/tasks/gitlab/import_export.rake b/lib/tasks/gitlab/import_export.rake
index dd1825c8a9e..44074397c05 100644
--- a/lib/tasks/gitlab/import_export.rake
+++ b/lib/tasks/gitlab/import_export.rake
@@ -9,5 +9,16 @@ namespace :gitlab do
task data: :environment do
puts YAML.load_file(Gitlab::ImportExport.config_file)['project_tree'].to_yaml(SortKeys: true)
end
+
+ desc 'GitLab | Bumps the Import/Export version for test_project_export.tar.gz'
+ task bump_test_version: :environment do
+ Dir.mktmpdir do |tmp_dir|
+ system("tar -zxf spec/features/projects/import_export/test_project_export.tar.gz -C #{tmp_dir} > /dev/null")
+ File.write(File.join(tmp_dir, 'VERSION'), Gitlab::ImportExport.version, mode: 'w')
+ system("tar -zcvf spec/features/projects/import_export/test_project_export.tar.gz -C #{tmp_dir} . > /dev/null")
+ end
+
+ puts "Updated to #{Gitlab::ImportExport.version}"
+ end
end
end