fastlane-plugin-clear_archived_data 0.1.0 → 0.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/README.md +1 -1
- data/lib/fastlane/plugin/clear_archived_data.rb +11 -84
- data/lib/fastlane/plugin/clear_archived_data/actions/clear_archived_data_action.rb +14 -17
- data/lib/fastlane/plugin/clear_archived_data/helper/clear_archived_data_helper.rb +0 -4
- data/lib/fastlane/plugin/clear_archived_data/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 6a85207ab46c8d294827ae7244d81e47d84f785bea2199d0daaf7013025730bb
|
4
|
+
data.tar.gz: 49833a9ef42175a266116a08206f55f8ae60593db64481f0ce6bad3a71995fb9
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 47da9f2f3be9974dca617fc57f505cac8e56a527dd28a7fe2b135261a18317a991f9e1a308dd495621ada8baa608d9c287e4430acf0e25ecd297360b8dec409c
|
7
|
+
data.tar.gz: 5c45d57790981227f237e23305c2844ae97580872350924205adc0a39f660ee2e938f5b222ec43f45fc5725f2e1aba8b9c7e10b47d12f1aee28dc3c9f1971c1b
|
data/README.md
CHANGED
@@ -12,7 +12,7 @@ fastlane add_plugin clear_archived_data
|
|
12
12
|
|
13
13
|
## About clear_archived_data
|
14
14
|
|
15
|
-
|
15
|
+
Deletes the archive file located at SharedValues::XCODEBUILD_ARCHIVE.
|
16
16
|
|
17
17
|
**Note to author:** Add a more detailed description about this plugin here. If your plugin contains multiple actions, make sure to mention them here.
|
18
18
|
|
@@ -1,89 +1,16 @@
|
|
1
|
-
require '
|
1
|
+
require 'fastlane/plugin/clear_archived_data/version'
|
2
2
|
|
3
3
|
module Fastlane
|
4
|
-
module
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
class ClearArchivedDataAction < Action
|
10
|
-
def self.run(params)
|
11
|
-
# fastlane will take care of reading in the parameter and fetching the environment variable:
|
12
|
-
path = File.expand_path("~/Library/Developer/Xcode/Archives")
|
13
|
-
UI.message("Archived Data path located at: #{path}")
|
14
|
-
FileUtils.rm_rf(path) if File.directory?(path)
|
15
|
-
UI.success("Successfully cleared Archived Data ♻️")
|
16
|
-
|
17
|
-
# sh "shellcommand ./path"
|
18
|
-
|
19
|
-
# Actions.lane_context[SharedValues::CLEAR_ARCHIVED_DATA_CUSTOM_VALUE] = "my_val"
|
20
|
-
end
|
21
|
-
|
22
|
-
#####################################################
|
23
|
-
# @!group Documentation
|
24
|
-
#####################################################
|
25
|
-
|
26
|
-
def self.description
|
27
|
-
"Deletes the Xcode Archived Data"
|
28
|
-
end
|
29
|
-
|
30
|
-
def self.details
|
31
|
-
# Optional:
|
32
|
-
# this is your chance to provide a more detailed description of this action
|
33
|
-
"Deletes the Archived Data from path set on Xcode or a supplied path"
|
34
|
-
end
|
35
|
-
|
36
|
-
def self.available_options
|
37
|
-
# Define all options your action supports.
|
38
|
-
|
39
|
-
# Below a few examples
|
40
|
-
[
|
41
|
-
FastlaneCore::ConfigItem.new(key: :api_token,
|
42
|
-
env_name: "FL_CLEAR_ARCHIVED_DATA_API_TOKEN", # The name of the environment variable
|
43
|
-
description: "API Token for ClearArchivedDataAction", # a short description of this parameter
|
44
|
-
verify_block: proc do |value|
|
45
|
-
UI.user_error!("No API token for ClearArchivedDataAction given, pass using `api_token: 'token'`") unless (value and not value.empty?)
|
46
|
-
# UI.user_error!("Couldn't find file at path '#{value}'") unless File.exist?(value)
|
47
|
-
end),
|
48
|
-
FastlaneCore::ConfigItem.new(key: :development,
|
49
|
-
env_name: "FL_CLEAR_ARCHIVED_DATA_DEVELOPMENT",
|
50
|
-
description: "Create a development certificate instead of a distribution one",
|
51
|
-
is_string: false, # true: verifies the input is a string, false: every kind of value
|
52
|
-
default_value: false) # the default value if the user didn't provide one
|
53
|
-
]
|
54
|
-
end
|
55
|
-
|
56
|
-
def self.output
|
57
|
-
# Define the shared values you are going to provide
|
58
|
-
# Example
|
59
|
-
[
|
60
|
-
['CLEAR_ARCHIVED_DATA_CUSTOM_VALUE', 'A description of what this value contains']
|
61
|
-
]
|
62
|
-
end
|
63
|
-
|
64
|
-
def self.return_value
|
65
|
-
# If your method provides a return value, you can describe here what it does
|
66
|
-
end
|
67
|
-
|
68
|
-
def self.authors
|
69
|
-
# So no one will ever forget your contribution to fastlane :) You are awesome btw!
|
70
|
-
["Onur Yıldırım"]
|
71
|
-
end
|
72
|
-
|
73
|
-
def self.is_supported?(platform)
|
74
|
-
[
|
75
|
-
'clear_derived_data'
|
76
|
-
]
|
77
|
-
#
|
78
|
-
# true
|
79
|
-
#
|
80
|
-
# platform == :ios
|
81
|
-
#
|
82
|
-
# [:ios, :mac].include?(platform)
|
83
|
-
#
|
84
|
-
|
85
|
-
platform == :ios
|
86
|
-
end
|
4
|
+
module ClearArchivedData
|
5
|
+
# Return all .rb files inside the "actions" and "helper" directory
|
6
|
+
def self.all_classes
|
7
|
+
Dir[File.expand_path('**/{actions,helper}/*.rb', File.dirname(__FILE__))]
|
87
8
|
end
|
88
9
|
end
|
89
10
|
end
|
11
|
+
|
12
|
+
# By default we want to import all available actions and helpers
|
13
|
+
# A plugin can contain any number of actions and plugins
|
14
|
+
Fastlane::ClearArchivedData.all_classes.each do |current|
|
15
|
+
require current
|
16
|
+
end
|
@@ -1,3 +1,4 @@
|
|
1
|
+
require 'fileutils'
|
1
2
|
require 'fastlane/action'
|
2
3
|
require_relative '../helper/clear_archived_data_helper'
|
3
4
|
|
@@ -5,11 +6,18 @@ module Fastlane
|
|
5
6
|
module Actions
|
6
7
|
class ClearArchivedDataAction < Action
|
7
8
|
def self.run(params)
|
8
|
-
|
9
|
+
path = Actions.lane_context[SharedValues::XCODEBUILD_ARCHIVE]
|
10
|
+
if File.directory?(path)
|
11
|
+
UI.message("Archive file found at path: #{path}")
|
12
|
+
FileUtils.rm_rf(path)
|
13
|
+
UI.success("Successfully deleted archive file. ♻️")
|
14
|
+
else
|
15
|
+
UI.message("Unable to locate archive file. Skipping...")
|
16
|
+
end
|
9
17
|
end
|
10
18
|
|
11
19
|
def self.description
|
12
|
-
"
|
20
|
+
"Deletes the archive file located at SharedValues::XCODEBUILD_ARCHIVE."
|
13
21
|
end
|
14
22
|
|
15
23
|
def self.authors
|
@@ -17,30 +25,19 @@ module Fastlane
|
|
17
25
|
end
|
18
26
|
|
19
27
|
def self.return_value
|
20
|
-
|
28
|
+
"No return value"
|
21
29
|
end
|
22
30
|
|
23
31
|
def self.details
|
24
|
-
|
25
|
-
"Deletes the Archived data from path set on Xcode"
|
32
|
+
"Deletes the archive file from path set on Xcode."
|
26
33
|
end
|
27
34
|
|
28
35
|
def self.available_options
|
29
|
-
[
|
30
|
-
# FastlaneCore::ConfigItem.new(key: :your_option,
|
31
|
-
# env_name: "CLEAR_ARCHIVED_DATA_YOUR_OPTION",
|
32
|
-
# description: "A description of your option",
|
33
|
-
# optional: false,
|
34
|
-
# type: String)
|
35
|
-
]
|
36
|
+
[]
|
36
37
|
end
|
37
38
|
|
38
39
|
def self.is_supported?(platform)
|
39
|
-
|
40
|
-
# See: https://docs.fastlane.tools/advanced/#control-configuration-by-lane-and-by-platform
|
41
|
-
#
|
42
|
-
# [:ios, :mac, :android].include?(platform)
|
43
|
-
true
|
40
|
+
[:ios, :mac].include?(platform)
|
44
41
|
end
|
45
42
|
end
|
46
43
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: fastlane-plugin-clear_archived_data
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.2.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Onur Yıldırım
|
@@ -148,7 +148,7 @@ files:
|
|
148
148
|
- lib/fastlane/plugin/clear_archived_data/actions/clear_archived_data_action.rb
|
149
149
|
- lib/fastlane/plugin/clear_archived_data/helper/clear_archived_data_helper.rb
|
150
150
|
- lib/fastlane/plugin/clear_archived_data/version.rb
|
151
|
-
homepage: https://github.com/yildirmonur/
|
151
|
+
homepage: https://github.com/yildirmonur/clear_archived_data
|
152
152
|
licenses:
|
153
153
|
- MIT
|
154
154
|
metadata: {}
|
@@ -170,5 +170,5 @@ requirements: []
|
|
170
170
|
rubygems_version: 3.0.3
|
171
171
|
signing_key:
|
172
172
|
specification_version: 4
|
173
|
-
summary:
|
173
|
+
summary: Deletes the archive file located at SharedValues::XCODEBUILD_ARCHIVE.
|
174
174
|
test_files: []
|