Skip to content

Conversation

@tleed5
Copy link
Collaborator

@tleed5 tleed5 commented May 28, 2025

Adds powershell and bash scripts to automate building and installing local packages to Octopus Deploy and the Kubernetes Monitor

Example usage:

# bash 
./build-local.sh 
./build-local.sh --languages=go 

# Powershell 
./build-local.ps1
./build-local.ps1 --languages=go

Example output

./build-local.sh

=== Generating SDKs ===
Running buf generate...
✅ SDKs generated successfully

=== Processing Go SDK ===
🔄 Adding replace directive to Go module...
✅ Added Go module replace directive to ../lobster-watcher/go.mod

=== Processing C# SDK ===
📦 Packing C# SDK with version: 1.0.1-tl-add-local-build-script-20250528161221
  Determining projects to restore...
  Restored /Users/tleed/dev/kubernetes-monitor-contracts/csharp/Octopus/Octopus.Kubernetes.Monitor.MessageContracts/Octopus.Kubernetes.Monitor.MessageContracts.csproj (in 92 ms).
  Octopus.Kubernetes.Monitor.MessageContracts -> /Users/tleed/dev/kubernetes-monitor-contracts/csharp/Octopus/Octopus.Kubernetes.Monitor.MessageContracts/bin/Debug/net8.0/Octopus.Kubernetes.Monitor.MessageContracts.dll
  The package Octopus.Kubernetes.Monitor.MessageContracts.1.0.1-tl-add-local-build-script-20250528161221 is missing a readme. Go to https://aka.ms/nuget/authoring-best-practices/readme to learn why package readmes are important.
  Successfully created package '/Users/tleed/dev/LocalPackages/Octopus.Kubernetes.Monitor.MessageContracts.1.0.1-tl-add-local-build-script-20250528161221.nupkg'.
✅ C# SDK packaged to ../LocalPackages

🔍 Searching for projects referencing Octopus.Kubernetes.Monitor.MessageContracts...
📝 Updating ../OctopusDeploy/source/Octopus.Observability/Octopus.Observability.csproj to use version 1.0.1-tl-add-local-build-script-20250528161221
📝 Updating ../OctopusDeploy/source/Octopus.Observability.MessageContracts/Octopus.Observability.MessageContracts.csproj to use version 1.0.1-tl-add-local-build-script-20250528161221
📝 Updating ../OctopusDeploy/source/Octopus.Server/Octopus.Server.csproj to use version 1.0.1-tl-add-local-build-script-20250528161221
✅ Updated 3 project(s) to use version 1.0.1-tl-add-local-build-script-20250528161221

✨ Local development setup complete!
./build-local.ps1

=== Generating SDKs ===
Running buf generate...
✅ SDKs generated successfully

=== Processing Go SDK ===
🔄 Adding replace directive to Go module...
✅ Added Go module replace directive to ../lobster-watcher/go.mod

=== Processing C# SDK ===
📦 Packing C# SDK with version: 1.0.1-tl-add-local-build-script-20250528163217
  Determining projects to restore...
  Restored /Users/tleed/dev/kubernetes-monitor-contracts/csharp/Octopus/Octopus.Kubernetes.Monitor.MessageContracts/Octopus.Kubernetes.Monitor.MessageContracts.csproj (in 86 ms).
  Octopus.Kubernetes.Monitor.MessageContracts -> /Users/tleed/dev/kubernetes-monitor-contracts/csharp/Octopus/Octopus.Kubernetes.Monitor.MessageContracts/bin/Debug/net8.0/Octopus.Kubernetes.Monitor.MessageContracts.dll
  The package Octopus.Kubernetes.Monitor.MessageContracts.1.0.1-tl-add-local-build-script-20250528163217 is missing a readme. Go to https://aka.ms/nuget/authoring-best-practices/readme to learn why package readmes are important.
  Successfully created package '/Users/tleed/dev/LocalPackages/Octopus.Kubernetes.Monitor.MessageContracts.1.0.1-tl-add-local-build-script-20250528163217.nupkg'.
✅ C# SDK packaged to ../LocalPackages
🔍 Searching for projects referencing Octopus.Kubernetes.Monitor.MessageContracts...
📝 Updating /Users/tleed/dev/OctopusDeploy/source/Octopus.Observability/Octopus.Observability.csproj to use version 1.0.1-tl-add-local-build-script-20250528163217
📝 Updating /Users/tleed/dev/OctopusDeploy/source/Octopus.Observability.MessageContracts/Octopus.Observability.MessageContracts.csproj to use version 1.0.1-tl-add-local-build-script-20250528163217
📝 Updating /Users/tleed/dev/OctopusDeploy/source/Octopus.Server/Octopus.Server.csproj to use version 1.0.1-tl-add-local-build-script-20250528163217
✅ Updated 3 project(s) to use version 1.0.1-tl-add-local-build-script-20250528163217

✨ Local development setup complete!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant