Last active
February 20, 2016 13:33
-
-
Save xleon/9b3a8750b9cf55e30893 to your computer and use it in GitHub Desktop.
Revisions
-
Diego Ponce de León revised this gist
Feb 20, 2016 . No changes.There are no files selected for viewing
-
Diego Ponce de León created this gist
Feb 20, 2016 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1 @@ PowerShell -File "$(ProjectDir)Update-Bundle.ps1" $(ProjectDir) $(ConfigurationName) This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,34 @@ param ([string] $ProjectDir, [string] $ConfigurationName) Write-Host "ProjectDir: $ProjectDir" Write-Host "ConfigurationName: $ConfigurationName" $PlistPath = $ProjectDir + "Info.plist" Write-Host "PlistPath: $PlistPath" [xml] $xdoc = Get-Content $PlistPath $displayName = $xdoc.plist.dict.ChildNodes[1].'#text' $identifier = $xdoc.plist.dict.ChildNodes[3].'#text' Write-Host "Current displayName: $displayName" Write-Host "Current identifier: $identifier" If ($ConfigurationName -eq "Debug") { $xdoc.plist.dict.ChildNodes[1].'#text' = "AppNameDev" $xdoc.plist.dict.ChildNodes[3].'#text' = "com.namespace.appname.dev" $xdoc.Save($PlistPath) } If ($ConfigurationName -eq "Ad-Hoc") { $xdoc.plist.dict.ChildNodes[1].'#text' = "AppNameSta" $xdoc.plist.dict.ChildNodes[3].'#text' = "com.namespace.appname.staging" $xdoc.Save($PlistPath) } If ($ConfigurationName -eq "AppStore") { $xdoc.plist.dict.ChildNodes[1].'#text' = "AppName" $xdoc.plist.dict.ChildNodes[3].'#text' = "com.namespace.appname" $xdoc.Save($PlistPath) }