Skip to content

Commit

Permalink
updated before creating PR
Browse files Browse the repository at this point in the history
  • Loading branch information
jwoo-msft committed Aug 1, 2019
1 parent 4800dcc commit 91cd27f
Showing 1 changed file with 2 additions and 18 deletions.
20 changes: 2 additions & 18 deletions source/ios/tools/IOSFeed/IOSFeed.cs
Original file line number Diff line number Diff line change
Expand Up @@ -24,22 +24,16 @@ private static async Task ProcessAsync()
storageConnectionString = sr.ReadToEnd();
}

Console.WriteLine("key string: " + storageConnectionString);
// Check whether the connection string can be parsed.
CloudStorageAccount storageAccount;
if (CloudStorageAccount.TryParse(storageConnectionString, out storageAccount))
{
// If the connection string is valid, proceed with operations against Blob
// storage here.
// ADD OTHER OPERATIONS HERE
Console.WriteLine("success!");
// Create the CloudBlobClient that represents the
// Blob storage endpoint for the storage account.
CloudBlobClient cloudBlobClient = storageAccount.CreateCloudBlobClient();

// Create a container called 'quickstartblobs' and
// append a GUID value to it to make the name unique.

var containerId = "adaptivecardsiosblobs";
CloudBlobContainer cloudBlobContainer =
cloudBlobClient.GetContainerReference(containerId);
Expand All @@ -53,7 +47,6 @@ private static async Task ProcessAsync()

await cloudBlobContainer.SetPermissionsAsync(permissions);

// Create a file in your local MyDocuments folder to upload to a blob.
var localPath = "source/ios/AdaptiveCards/AdaptiveCards";
var localFileName = "AdaptiveCards.framework";
var option = ".zip";
Expand All @@ -65,17 +58,14 @@ private static async Task ProcessAsync()

await cloudBlockBlob.UploadFromFileAsync(sourceFile);

Console.WriteLine("List blobs in container.");
BlobContinuationToken blobContinuationToken = null;
do
{
var results = await cloudBlobContainer.ListBlobsSegmentedAsync(null, blobContinuationToken);
// Get the value of the continuation token returned by the listing call.
blobContinuationToken = results.ContinuationToken;
Console.WriteLine("blobs guid: " + blobGuid);
foreach (IListBlobItem item in results.Results)
{
Console.WriteLine(item.Uri);
var uriString = item.Uri.ToString();
if (uriString.Contains(blobGuid))
{
Expand All @@ -86,18 +76,12 @@ private static async Task ProcessAsync()
}
else
{
// Otherwise, let the user know that they need to define the environment variable.
Console.WriteLine(
"A connection string has not been defined in the system environment variables. " +
"Add an environment variable named 'CONNECT_STR' with your storage " +
"connection string as a value.");
Console.WriteLine("missing valid connection string");
}
}

private static void UpdatePodSpec(string uri)
{
var adaptiveVersion = Environment.GetEnvironmentVariable("ADCVERSION");
//var localPath = "../../../../";//"source/ios/tools";
var localPath = "./source/ios/tools/";
var targetPath = "./source/ios/";
var localFileName = "AdaptiveCards.podspec";
Expand All @@ -121,6 +105,7 @@ private static void UpdatePodSpec(string uri)
}
else if (splits[0].Contains("spec.version"))
{
var adaptiveVersion = Environment.GetEnvironmentVariable("ADCVERSION");
s = splits[0] + "= '" + adaptiveVersion + "'" ;
}
}
Expand All @@ -133,7 +118,6 @@ private static void UpdatePodSpec(string uri)
}

File.WriteAllText(targetFile, output);
Console.WriteLine(output);
}
}
}
Expand Down

0 comments on commit 91cd27f

Please sign in to comment.