Skip to content

Instantly share code, notes, and snippets.

@neilcampbell
Last active August 6, 2019 02:53
Show Gist options
  • Save neilcampbell/611117098a73c42e59b36737182de919 to your computer and use it in GitHub Desktop.
Save neilcampbell/611117098a73c42e59b36737182de919 to your computer and use it in GitHub Desktop.
build pact uri from environment tags
using System;
using System.Linq;
public class Program
{
public static void Main()
{
var env = "prod master"; // Environment.GetEnvironmentVariable("PACT_TAGS");
var tags = env.Split(' ');
var uris = tags.Select(t => $"http://broker-host/pacts/provider/MyProvider/consumer/MyConsumer/{t}");
Console.WriteLine(String.Join(' ', uris));
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment