Top Level Namespace

Defined Under Namespace

Modules: Mercure

Instance Method Summary collapse

Instance Method Details

#addInfosToIcon(settings, source_file, dest_file) ⇒ Object



38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
# File 'lib/mercure/update_icon.rb', line 38

def addInfosToIcon (settings , source_file , dest_file)

  projectInfosPath  = settings[:projectInfosPath]
  projectInfos      = Plist::parse_xml(projectInfosPath)

  version = projectInfos["CFBundleVersion"]
  commit  = `git rev-parse --short HEAD`.strip
  branch  = `git rev-parse --abbrev-ref HEAD`.strip
  width   = `identify -format %w #{source_file}`
  caption = iconCaptionForDeploy settings[:deploy]

  command  = "convert -background '#0008'"
  command += " -fill white -gravity center"
  command += " -size #{width}x40"
  command += " caption:\"#{caption}\" \"#{source_file}\""
  command += " +swap -gravity south -composite \"#{dest_file}\""

  system(command)

end

#appPath(settings) ⇒ Object

Application



8
9
10
11
12
13
14
15
16
17
# File 'lib/mercure/paths.rb', line 8

def appPath (settings)
  
  buildDirectory      = settings[:buildDirectory]
  buildConfiguration  = settings[:buildConfiguration]
  buildNumber         = settings[:buildNumber]
  bundleName          = settings[:bundleName]
  
  "#{buildDirectory}/#{buildConfiguration}-iphoneos/#{bundleName}.app"
  
end

#buildApp(settings) ⇒ Object



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
# File 'lib/mercure/build.rb', line 6

def buildApp (settings)
  
  applicationName     = settings[:applicationName]
  projectDirectory    = settings[:projectDirectory]
  
  workspaceName       = settings[:workspaceName]
  schemeName          = settings[:schemeName]
  targetSDK           = settings[:targetSDK]
  
  buildConfiguration  = settings[:buildConfiguration]
  buildDirectory      = settings[:buildDirectory]
  
  puts "Compilation de l'application #{applicationName}"
  
  build_command  = "xcodebuild"
  build_command += " -workspace \"#{workspaceName}\""
  build_command += " -scheme \"#{schemeName}\""
  build_command += " -configuration #{buildConfiguration}"
  build_command += " -sdk iphoneos"
  build_command += " BUILD_DIR=\"#{buildDirectory}\""
  build_command += " BUILD_PRODDUCTS_DIR=\"#{buildDirectory}\"/#{buildConfiguration}-iphoneos"
  build_command += " TARGET_BUILD_DIR=\"#{buildDirectory}\"/#{buildConfiguration}-iphoneos"
  build_command += " CONFIGURATION_BUILD_DIR=\"#{buildDirectory}\"/#{buildConfiguration}-iphoneos"
  build_command += " clean build"
  build_command += " | tee \"#{buildDirectory}/logs/#{applicationName}_building.log\""
  build_command += " | xcpretty -c --report html"
  
  puts build_command
  
  Dir.chdir "#{projectDirectory}"
  system("#{build_command}")
  
end

#buildArtefacts(xcode_settings) ⇒ Object



226
227
228
229
# File 'lib/mercure/deploy.rb', line 226

def buildArtefacts (xcode_settings)
  generateIpa   xcode_settings
  generatePlist xcode_settings
end

#buildDeploy(deploy) ⇒ Object



58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
# File 'lib/mercure/deploy.rb', line 58

def buildDeploy (deploy)
  
  puts "Chargement des variables"
  settings = load_settings deploy
  
  # on s'assure d'être dans la bonne version du code
  # si le Info.plist ne contient pas de valeur pour la clé
  # :CFBundleVersion (ce qui serait un peu embetant)
  # on taggue le commit courant
  checkOutGitVersion settings

  puts "Création de l'.app"
  buildApp settings
  updateBuild settings
  
  puts "Création de l'.ipa et du .plist"
  buildArtefacts settings
  
end

#buildDeployments(plist) ⇒ Object

Build



23
24
25
26
27
28
29
30
31
# File 'lib/mercure/deploy.rb', line 23

def buildDeployments (plist)
  
  deployments = Plist::parse_xml(plist)      
  
  deployments.each do |deploy|
    buildDeploy deploy
  end
  
end

#buildDeploymentsByAsking(plist) ⇒ Object



33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
# File 'lib/mercure/deploy.rb', line 33

def buildDeploymentsByAsking (plist)
  
  deployments = Plist::parse_xml(plist)
  
  deployments.each do |deploy|
    
    settings = load_settings deploy
    
    choose do |menu|
      
      versionText = " dans sa version #{settings[:CFBundleVersion]}" if not settings[:CFBundleVersion].nil?
      menu.prompt = "Veux-tu builder #{settings[:applicationName]}#{versionText} ?"

      menu.choice(:oui) do
        say("Bon choix !")
        buildDeploy deploy
      end
      
      menu.choice(:non) { say("Dommage") }
    end

  end  
end

#checkOutGitVersion(settings) ⇒ Object



6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
# File 'lib/mercure/git.rb', line 6

def checkOutGitVersion (settings)
  
  tags            = `git tag`
  tag_name        = settings[:CFBundleVersion]
  current_commit  = settings[:gitSHA1]
  
  # choose do |menu|
  #   menu.prompt = "Would you like to create a tag for this build ?  "
  #
  #   menu.choice(:yes) { say("Good choice!") }
  #   menu.choice(:no) { say("Too bad") }
  # end
  
  if tags.include?("#{tag_name}\n") == false
    puts "Le tag #{tag_name} n'existe pas."
    puts "Nous allons le créer pour pointer vers le commit actuel (#{current_commit})"

    create_tag = `git tag #{tag_name}`
  end
  
  puts "On checkout le tag #{tag_name}"
end

#deployDeploy(deploy) ⇒ Object

I know, I know



177
178
179
180
181
182
183
184
185
186
# File 'lib/mercure/deploy.rb', line 177

def deployDeploy (deploy)
  
  puts "Chargement des variables"
  settings = load_settings deploy
    
  puts "Mise à jour de Parse"
  objectId = updateParse settings
  deploy["parse"]["objectId"] = objectId
  
end

#deployDeployments(plist_path) ⇒ Object



160
161
162
163
164
165
166
167
168
169
170
171
172
173
# File 'lib/mercure/deploy.rb', line 160

def deployDeployments (plist_path)
  
  plist_content = CFPropertyList::List.new(file: plist_path)
  deployments   = CFPropertyList.native_types(plist_content.value)
  
  deployments.each do |deploy|
    deployDeploy deploy
  end
  
  puts "sauvegardes des infos de parse"
  plist_content.value = CFPropertyList.guess(deployments)
  plist_content.save(plist_path , CFPropertyList::List::FORMAT_XML)
  
end

#deployDeploymentsByAsking(plist_path) ⇒ Object

Deploy



129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
# File 'lib/mercure/deploy.rb', line 129

def deployDeploymentsByAsking (plist_path)
  
  plist_content = CFPropertyList::List.new(file: plist_path)
  deployments   = CFPropertyList.native_types(plist_content.value)
  
  deployments.each do |deploy|
    
    settings = load_settings deploy
    
    choose do |menu|
      
      versionText = " dans sa version #{settings[:CFBundleVersion]}" if not settings[:CFBundleVersion].nil?
      menu.prompt = "Veux-tu déployer #{settings[:applicationName]}#{versionText} ?"

      menu.choice(:oui) do
        say("Bon choix !")
        deployDeploy deploy
      end
      
      menu.choice(:non) { say("Dommage") }
    end
    
  end
  
  puts "sauvegardes des infos de parse"
  plist_content.value = CFPropertyList.guess(deployments)
  plist_content.save(plist_path , CFPropertyList::List::FORMAT_XML)
  
end

#deployPlistPath(settings) ⇒ Object



75
76
77
78
79
80
81
82
83
84
85
# File 'lib/mercure/paths.rb', line 75

def deployPlistPath (settings)

  buildDirectory      = settings[:buildDirectory]
  buildConfiguration  = settings[:buildConfiguration]
  buildNumber         = settings[:buildNumber]
  applicationName     = settings[:applicationName]
  plistName           = plistName settings
  
  "#{buildDirectory}/#{buildConfiguration}-iphoneos/#{plistName}"

end

#dsymPath(settings) ⇒ Object

Dsym



119
120
121
122
123
124
125
126
127
# File 'lib/mercure/paths.rb', line 119

def dsymPath (settings)
  
  buildDirectory      = settings[:buildDirectory]
  buildConfiguration  = settings[:buildConfiguration]
  bundleName          = settings[:bundleName]
  
  "#{buildDirectory}/#{buildConfiguration}-iphoneos/#{bundleName}.app.dSYM"
  
end

#generateIpa(settings) ⇒ Object



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
44
45
46
47
# File 'lib/mercure/ipa.rb', line 9

def generateIpa settings
    
  buildDirectory      = settings[:buildDirectory]
  buildConfiguration  = settings[:buildConfiguration]
  buildNumber         = settings[:buildNumber]
  applicationName     = settings[:applicationName]
  
  appPath       = appPath(settings)
  ipaPath       = ipaPath(settings)
  
  dsymPath        = dsymPath(settings)
  savedDsymPath   = savedDsymPath(settings)
  zippedDsymPath  = zippedDsymPath(settings)
  
  signingIdentity     = settings[:signingIdentity]
  provisioningProfile = settings[:provisioningProfile]
  
  system "mkdir -p \"#{buildDirectory}/logs/\""
    
  puts "Construction de l'IPA"
  
  # system("codesign -s \"#{signingIdentity}\" \"#{appPath}\"")
  
  signingCommand =  "/usr/bin/xcrun -sdk iphoneos PackageApplication"
  signingCommand +=  " -v \"#{appPath}\""
  signingCommand +=  " -o \"#{ipaPath}\""
  signingCommand +=  " --sign \"#{signingIdentity}\""
  signingCommand +=  " --embed \"#{provisioningProfile}\""
  signingCommand += " | tee \"#{buildDirectory}/logs/#{applicationName}_package.log\""
  
  system("echo \"#{signingCommand}\" | tee \"#{buildDirectory}/logs/#{applicationName}_package.log\" ")
  system signingCommand
  
  system("rm -R -f \"#{savedDsymPath}\"")
  system("cp -R \"#{dsymPath}\" \"#{savedDsymPath}\"")
  system("zip -r \"#{zippedDsymPath}\" \"#{savedDsymPath}\"")
  system("rm -R -f \"#{dsymPath}\"")
  
end

#generatePlist(settings) ⇒ Object



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
44
45
46
47
48
49
# File 'lib/mercure/plist.rb', line 10

def generatePlist (settings)
  
  puts "Creation du plist"
  
  buildConfiguration  = settings[:buildConfiguration]
  buildDirectory      = settings[:buildDirectory]
  buildNumber         = settings[:buildNumber]
  projectInfosPath    = settings[:projectInfosPath]
  
  projectInfos    = Plist::parse_xml(projectInfosPath)
  deployPlistPath = deployPlistPath(settings)
  
  deployPlist = Hash.new
  items       = Array.new
  item        = Hash.new
  
  
  assets      = Array.new
  asset       = Hash.new
  asset['kind'] = 'software-package'
  
  asset['url']  = settings[:deploy]["uploadServer"]["ipa"][0]["publicURL"] + "/" + ipaName(settings)

  assets.push asset
  
      = Hash.new
  ['bundle-identifier'] = settings[:deploy]["infosPlist"]["CFBundleIdentifier"] + ".iOS8"
  ['bundle-version']    = projectInfos['CFBundleVersion']
  ['subtitle']          = 'by SoLocal'
  ['title']             = settings[:deploy]["infosPlist"]["CFBundleDisplayName"]
  ['kind']              = 'software'
  
  item['assets']    = assets
  item['metadata']  = 
  
  items.push item
  deployPlist['items'] = items
  Plist::Emit.save_plist(deployPlist , deployPlistPath)
  
end

#iconCaptionForDeploy(deploy) ⇒ Object



59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
# File 'lib/mercure/update_icon.rb', line 59

def iconCaptionForDeploy(deploy)
  
  caption = ""
  
  if !deploy["icon"]["addBuildNumber"]
    caption += "#{version}"
  end
  
  
  if !deploy["icon"]["addCommitId"]
    caption += "#{commit}"
  end
    
  caption
end

#ipaName(settings) ⇒ Object

IPA



23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
# File 'lib/mercure/paths.rb', line 23

def ipaName (settings)

  buildDirectory      = settings[:buildDirectory]
  buildConfiguration  = settings[:buildConfiguration]
  buildNumber         = settings[:buildNumber]
  applicationName     = settings[:applicationName]
  
  pjServerConf        = settings[:deploy]["infosPlist"]["PJServerConf"]

  if settings[:buildConfiguration] == "Release"
    "#{applicationName}.ipa"
  else
    "#{applicationName}.#{buildNumber}.ipa"
  end
  
end

#ipaPath(settings) ⇒ Object



40
41
42
43
44
45
46
47
48
49
50
# File 'lib/mercure/paths.rb', line 40

def ipaPath (settings)
  
  buildDirectory      = settings[:buildDirectory]
  buildConfiguration  = settings[:buildConfiguration]
  buildNumber         = settings[:buildNumber]
  applicationName     = settings[:applicationName]
  ipaName             = ipaName(settings)
  
  "#{buildDirectory}/#{buildConfiguration}-iphoneos/#{ipaName}"
  
end

#load_settings(deploy) ⇒ Object



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
# File 'lib/mercure/settings.rb', line 5

def load_settings(deploy)

  settings = Hash.new
  
  settings[:deploy]               = deploy
  
  settings[:applicationName]      = deploy["infosPlist"]["CFBundleDisplayName"]
  settings[:CFBundleVersion]      = deploy["infosPlist"]["CFBundleVersion"]

  settings[:projectDirectory]     = Dir.pwd
  settings[:projectInfosPath]     = settings[:projectDirectory] + "/" + deploy["paths"]["infosPlistRelativePath"]
  
  settings[:bundleName]           = deploy["build"]["projectName"]
  settings[:workspaceName]        = deploy["build"]["workspaceName"]
  settings[:schemeName]           = deploy["build"]["schemeName"]
  settings[:targetSDK]            = deploy["build"]["targetSDK"]

  settings[:buildConfiguration]   = deploy["build"]["buildConfiguration"]
  settings[:buildDirectory]       = settings[:projectDirectory] + "/" + deploy["paths"]["buildRelativePath"]
  settings[:buildNumber]          = `git rev-list --max-count=1 HEAD`[0..7]

  settings[:gitSHA1]              = `git rev-list --max-count=1 HEAD`[0..7]

  settings[:signingIdentity]      = deploy["signing"]["identity"]
  settings[:provisioningProfile]  = "\"#{settings[:projectDirectory]}/#{deploy["signing"]["profile"]}\""
    
  settings

end

#localDTMobFileObject



169
170
171
172
173
# File 'lib/mercure/paths.rb', line 169

def localDTMobFile
  
  "/tmp/dtmob.xml"
 
end

#panDeployments(plist) ⇒ Object

pan



192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
# File 'lib/mercure/deploy.rb', line 192

def panDeployments (plist)
  
  deployments = Plist::parse_xml(plist)      
  
  deployments.each do |deploy|
    
    puts "Chargement des variables"
    settings = load_settings deploy
    
    # on s'assure d'être dans la bonne version du code
    # si le Info.plist ne contient pas de valeur pour la clé
    # :CFBundleVersion (ce qui serait un peu embetant)
    # on taggue le commit courant
    checkOutGitVersion settings

    puts "Création de l'.app"
    buildApp settings
    updateBuild settings
    
    puts "Création de l'.ipa et du .plist"
    buildArtefacts settings
    
    puts "Téléversement de l'.ipa et du .plist"
    uploadArtefacts settings

    puts "Mise à jour de Parse"
    updateParse settings
  
  end
  
end

#plistInAppPath(settings) ⇒ Object

Plist



66
67
68
69
70
71
72
73
# File 'lib/mercure/paths.rb', line 66

def plistInAppPath (settings)
  
  buildDirectory      = settings[:buildDirectory]
  buildConfiguration  = settings[:buildConfiguration]
  bundleName          = settings[:bundleName]
  
  "#{buildDirectory}/#{buildConfiguration}-iphoneos/#{bundleName}.app/Info.plist"  
end

#plistName(settings) ⇒ Object



96
97
98
99
100
101
102
103
104
# File 'lib/mercure/paths.rb', line 96

def plistName (settings)
  
  applicationName     = settings[:applicationName]
  pjServerConf        = settings[:deploy]["infosPlist"]["PJServerConf"]
  buildNumber         = settings[:buildNumber]
  
  "#{applicationName}.#{buildNumber}.plist"
  
end

#publicPlistURL(settings) ⇒ Object



106
107
108
109
110
111
112
113
# File 'lib/mercure/paths.rb', line 106

def publicPlistURL (settings)
  
  publicURL  = settings[:deploy]["uploadServer"]["plist"][0]["publicURL"]  
  plistName   = plistName (settings)
  
  "#{publicURL}/#{plistName}"
  
end

#remoteDeployPlistPath(settings, destination) ⇒ Object



87
88
89
90
91
92
93
94
# File 'lib/mercure/paths.rb', line 87

def remoteDeployPlistPath (settings , destination)
  
  remotePath  = destination["path"]  
  plistName   = plistName (settings)
  
  "#{remotePath}/#{plistName}"
  
end

#remoteDsymPath(settings, destination) ⇒ Object



146
147
148
149
150
151
152
153
154
155
156
# File 'lib/mercure/paths.rb', line 146

def remoteDsymPath (settings , destination)
  
  buildNumber         = settings[:buildNumber]
  applicationName     = settings[:applicationName]  
  
  remotePath  = destination["path"]  
  dsymName    = "#{applicationName}.#{buildNumber}.app.dSYM.zip"
  
  "#{remotePath}/#{dsymName}"
  
end

#remoteDTMobFileObject



163
164
165
166
167
# File 'lib/mercure/paths.rb', line 163

def remoteDTMobFile
  
  "./dtmob.xml"
  
end

#remoteIpaPath(settings, destination) ⇒ Object



52
53
54
55
56
57
58
59
# File 'lib/mercure/paths.rb', line 52

def remoteIpaPath (settings , destination)

  ipaName             = ipaName(settings)
  remotePath          = destination["path"]
  
  "#{remotePath}/#{ipaName}"
  
end

#savedDsymPath(settings) ⇒ Object



129
130
131
132
133
134
135
136
137
138
# File 'lib/mercure/paths.rb', line 129

def savedDsymPath (settings)
  
  buildDirectory      = settings[:buildDirectory]
  buildConfiguration  = settings[:buildConfiguration]
  buildNumber         = settings[:buildNumber]
  applicationName     = settings[:applicationName]
  
  "#{buildDirectory}/#{buildConfiguration}-iphoneos/#{applicationName}.#{buildNumber}.app.dSYM"
  
end

#tagGit(settings) ⇒ Object



29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
# File 'lib/mercure/git.rb', line 29

def tagGit (settings)
  
  tag_name       = settings[:CFBundleVersion]
  current_commit = settings[:gitSHA1]
  
  # si le tag existe déjà on l'efface
  tags = `git tag`
  
  if tags.include?("#{tag_name}\n")
    puts "Le tag #{tag_name} existe déjà."
    puts "Nous allons le faire pointer vers le commit actuel (#{current_commit})"

    delete_tag = `git tag -d #{tag_name}`
  end
  
  create_tag = `git tag #{tag_name}`

end

#updateBuild(settings) ⇒ Object



40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
# File 'lib/mercure/build.rb', line 40

def updateBuild (settings)
  
  updateIcon settings
    
  projectInfosPath  = plistInAppPath(settings)
  
  puts "Mise-à-jour du fichier #{projectInfosPath}"
  
  # projectInfos      = Plist::parse_xml(projectInfosPath)
  
  plist         = CFPropertyList::List.new(file: projectInfosPath)
  projectInfos  = CFPropertyList.native_types(plist.value)
  
  settings[:deploy]["infosPlist"].each do |key , value|
    projectInfos[key] = value
  end
  
  # ajout du SHA1 du commit servant à builder cette version
  projectInfos["lastCommitSHA1"] = settings[:gitSHA1]
  
  
  plist.value = CFPropertyList.guess(projectInfos)
  plist.save(projectInfosPath , CFPropertyList::List::FORMAT_BINARY)
  
end

#updateIcon(settings) ⇒ Object



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
# File 'lib/mercure/update_icon.rb', line 11

def updateIcon (settings)

  iconsBasePath = "#{settings[:projectDirectory]}/PagesJaunes/Data/Images/SPLASH+ICONE"
  icons = [["Icon_base.png" , "Icon.png"] , ["[email protected]" , "[email protected]"]]
  
  should_update_icon = settings[:deploy]["icon"]["addExtraInfosInIcon"]
  
  if !should_update_icon
    return
  end
  
  basePath = appPath(settings)

  icons.each do |files|
    
    source_file = "#{iconsBasePath}/#{files[0]}"
    dest_file   = "#{basePath}/#{files[1]}"
    
    puts "Modification de #{source_file}"
    puts "vers #{dest_file}"

    addInfosToIcon settings , source_file , dest_file
    
  end

end

#updateParse(settings) ⇒ Object



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
44
45
46
47
48
49
50
51
# File 'lib/mercure/parse.rb', line 9

def updateParse (settings)

  Parse.init  application_id: settings[:deploy]["parse"]["appId"],
              api_key:        settings[:deploy]["parse"]["apiKey"]
              
  parseInfos = settings[:deploy]["parse"]
  
  objectId = parseInfos["objectId"]
  
  if (objectId.nil? or objectId.length == 0)
    appVersion = Parse::Object.new("ApplicationVersion")
  else
    puts "On a déjà déployé cette version, on la met à jour"
    appVersionsQuery = Parse::Query.new("ApplicationVersion")
    appVersionsQuery.eq("objectId", objectId)
    appVersion = appVersionsQuery.get.first
  end

  appVersion["applicationId"]    = parseInfos["applicationId"]
  appVersion["versionNumber"]    = parseInfos["versionNumber"]
  appVersion["versionChangeLog"] = parseInfos["versionChangeLog"]
  appVersion["versionLevel"]     = parseInfos["versionLevel"].to_i
  appVersion["versionUrl"]       = publicPlistURL settings

  result = appVersion.save
  
  if (objectId.nil? or objectId.length == 0)
    puts "le déploiement a été créée"
  else
    puts "le déploiement a bien été mis à jour"
  end  
  
  # on "met à jour" l'application
  
  appQuery = Parse::Query.new("Application")
  appQuery.eq("objectId", parseInfos["applicationId"])
  app = appQuery.get.first
  
  dontCare = app.save
  
  result["objectId"]
  
end

#uploadDeploy(deploy) ⇒ Object



117
118
119
120
121
122
123
# File 'lib/mercure/deploy.rb', line 117

def uploadDeploy (deploy)
  puts "Chargement des variables"
  settings = load_settings deploy
  
  puts "Téléversement de l'.ipa et du .plist"
  uploadArtefacts settings
end

#uploadDeployments(plist) ⇒ Object



107
108
109
110
111
112
113
114
# File 'lib/mercure/deploy.rb', line 107

def uploadDeployments (plist)
  
  deployments = Plist::parse_xml(plist)      
  
  deployments.each do |deploy|
    uploadDeploy deploy
  end
end

#uploadDeploymentsByAsking(plist) ⇒ Object

Upload



83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
# File 'lib/mercure/deploy.rb', line 83

def uploadDeploymentsByAsking (plist)
  
  deployments = Plist::parse_xml(plist)
  
  deployments.each do |deploy|
    
    settings = load_settings deploy
    
    choose do |menu|
      
      versionText = " dans sa version #{settings[:CFBundleVersion]}" if not settings[:CFBundleVersion].nil?
      menu.prompt = "Veux-tu uploader #{settings[:applicationName]}#{versionText} ?"

      menu.choice(:oui) do
        say("Bon choix !")
        uploadDeploy deploy
      end
      
      menu.choice(:non) { say("Dommage") }
    end

  end  
end

#zippedDsymPath(settings) ⇒ Object



140
141
142
143
144
# File 'lib/mercure/paths.rb', line 140

def zippedDsymPath (settings)
  
  savedDsymPath(settings) + ".zip"
  
end