Class: Fastlane::Actions::ArgumentManager

Inherits:
Object
  • Object
show all
Defined in:
lib/fastlane/plugin/flutter_version_manager/actions/flutter_version_manager_action.rb

Instance Method Summary collapse

Instance Method Details

#commandsObject



41
42
43
44
45
46
47
48
49
50
51
# File 'lib/fastlane/plugin/flutter_version_manager/actions/flutter_version_manager_action.rb', line 41

def commands
  "
  -h: Access this menu
  -version: Reads current version name
  -code: Reads current version code
  -major: Bumps major version
  -minor: Bumps minor version
  -patch: Bumps patch version
  -apply: Applies version specified from version.yml to pubspec
  "
end

#evaluateArgument(argument) ⇒ Object



12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
# File 'lib/fastlane/plugin/flutter_version_manager/actions/flutter_version_manager_action.rb', line 12

def evaluateArgument(argument)
  case argument
  when '-h'
    true
  when "-version"
    true
  when "-code"
    true
  when "-major"
    true
  when "-minor"
    true
  when "-patch"
    true
  when "-apply"
    true
  else
    false
  end
end

#invalid_argumentObject



33
34
35
# File 'lib/fastlane/plugin/flutter_version_manager/actions/flutter_version_manager_action.rb', line 33

def invalid_argument
  UI.message("You have to pass at least one argument: Use -h view all commands")
end

#missing_required_argumentsObject



37
38
39
# File 'lib/fastlane/plugin/flutter_version_manager/actions/flutter_version_manager_action.rb', line 37

def missing_required_arguments
  UI.message("You have to pass paths to version.yml and pubspec.yml: Use -h for more info")
end