Sha256: 1714bd19eee389f806a09a6c98623fef97be931d9ca9209a3d0de70d5f949f9e
Contents?: true
Size: 928 Bytes
Versions: 2
Compression:
Stored size: 928 Bytes
Contents
module Fastlane module Actions class RestoreFileAction < Action def self.run(params) path = params[:path] backup_path = "#{path}.back" raise "Could not find file '#{backup_path}'" unless File.exist? backup_path FileUtils.cp(backup_path, path, {preserve: true}) FileUtils.rm(backup_path) UI.message("Successfully restored backup 📤") end def self.description 'This action restore your file that was backuped with the `backup_file` action' end def self.is_supported?(platform) true end def self.author "gin0606" end def self.available_options [ FastlaneCore::ConfigItem.new(key: :path, description: "Original file name you want to restore", optional: false) ] end end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
fastlane-1.68.0 | lib/fastlane/actions/restore_file.rb |
fastlane-1.67.0 | lib/fastlane/actions/restore_file.rb |