mirror of
https://gitlab.com/gitlab-org/gitlab-foss.git
synced 2025-07-29 12:00:32 +00:00
Add latest changes from gitlab-org/gitlab@master
This commit is contained in:
34
gems/gitlab-backup-cli/lib/gitlab/backup/cli/runner.rb
Normal file
34
gems/gitlab-backup-cli/lib/gitlab/backup/cli/runner.rb
Normal file
@ -0,0 +1,34 @@
|
||||
# frozen_string_literal: true
|
||||
|
||||
require 'thor'
|
||||
|
||||
module Gitlab
|
||||
module Backup
|
||||
module Cli
|
||||
# GitLab Backup CLI
|
||||
#
|
||||
# This supersedes the previous backup rake files and will be
|
||||
# the default interface to handle backups
|
||||
class Runner < Thor
|
||||
def self.exit_on_failure?
|
||||
true
|
||||
end
|
||||
|
||||
map %w[--version -v] => :version
|
||||
desc 'version', 'Display the version information'
|
||||
|
||||
def version
|
||||
puts "GitLab Backup CLI (#{VERSION})"
|
||||
end
|
||||
|
||||
private
|
||||
|
||||
def rails_environment!
|
||||
require APP_PATH
|
||||
|
||||
Rails.application.load_tasks
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
9
gems/gitlab-backup-cli/lib/gitlab/backup/cli/version.rb
Normal file
9
gems/gitlab-backup-cli/lib/gitlab/backup/cli/version.rb
Normal file
@ -0,0 +1,9 @@
|
||||
# frozen_string_literal: true
|
||||
|
||||
module Gitlab
|
||||
module Backup
|
||||
module Cli
|
||||
VERSION = "0.0.1"
|
||||
end
|
||||
end
|
||||
end
|
Reference in New Issue
Block a user