Class: Pantograph::SetupGeneric

Inherits:
Setup
  • Object
show all
Defined in:
pantograph/lib/pantograph/setup/setup_maven.rb,
pantograph/lib/pantograph/setup/setup_generic.rb

Instance Attribute Summary

Attributes inherited from Setup

#had_multiple_projects_to_choose_from, #lane_to_mention, #pantfile_content, #platform, #preferred_setup_method, #project_path

Instance Method Summary collapse

Methods inherited from Setup

#add_or_update_gemfile, #append_lane, #continue_with_enter, #ensure_gemfile_valid!, #explain_concepts, #gemfile_exists?, #gemfile_path, #initialize, #pantfile_template_content, #setup_gemfile!, #show_analytics_note, start, #suggest_next_steps, #welcome_to_pantograph, #write_pantfile!

Constructor Details

This class inherits a constructor from Pantograph::Setup

Instance Method Details

#fetch_informationObject



42
43
44
45
46
47
48
49
50
# File 'pantograph/lib/pantograph/setup/setup_maven.rb', line 42

def fetch_information
  # UI.message('')
  # UI.message("To avoid re-entering your package name and issuer every time you run pantograph, we'll store those in a so-called Appfile.")

  # self.package_name = UI.input("Package Name (com.krausefx.app): ")
  # puts("")
  # puts("To automatically upload builds and metadata to Google Play, pantograph needs a service account json secret file".yellow)
  # puts("Feel free to press Enter at any time in order to skip providing pieces of information when asked")
end

#finish_upObject



52
53
54
55
56
# File 'pantograph/lib/pantograph/setup/setup_maven.rb', line 52

def finish_up
  # self.pantfile_content.gsub!(":generic", ":generic")

  super
end

#setup_genericObject

attr_accessor :package_name



5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
# File 'pantograph/lib/pantograph/setup/setup_generic.rb', line 5

def setup_generic
  # self.platform = :generic

  welcome_to_pantograph

  self.pantfile_content = pantfile_template_content

  fetch_information

  PantographCore::PantographFolder.create_folder!

  self.append_lane([
                     "desc 'Runs all the  tests'",
                     "lane :test do",
                     "  # Add command to execute your tests",
                     "  sh('$shell_command_replace_me')",
                     "end"
                   ])

  self.append_lane([
                     "desc 'Publish new version to Artifactory'",
                     "lane :build do",
                     "  # Add command to build your application",
                     "  sh('$shell_command_replace_me')",
                     "end"
                   ])

  self.append_lane([
                     "desc 'Deploy a new version to Artifactory'",
                     "lane :publish do",
                     "  # Add command to deploy your application",
                     "  sh('$shell_command_replace_me')",
                     "end"
                   ])

  self.lane_to_mention = "test"

  finish_up
end

#setup_gradleObject

attr_accessor :package_name



5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
# File 'pantograph/lib/pantograph/setup/setup_maven.rb', line 5

def setup_gradle
  # self.platform = :generic

  welcome_to_pantograph

  self.pantfile_content = pantfile_template_content

  fetch_information

  PantographCore::PantographFolder.create_folder!

  self.append_lane([
                     "desc 'Runs all the  tests'",
                     "lane :test do",
                     "  maven(task: 'clean install')",
                     "end"
                   ])

  self.append_lane([
                     "desc 'Publish new version to Artifactory'",
                     "lane :build do",
                     "  maven(task: 'clean build')",
                     "end"
                   ])

  self.append_lane([
                     "desc 'Deploy a new version to Artifactory'",
                     "lane :publish do",
                     "  maven(task: 'clean deploy')",
                     "end"
                   ])

  self.lane_to_mention = "test"

  finish_up
end