Skip to content

Commit 3a142f6

Browse files
chore(p2): add winget/choco/scoop distribution templates (#44)
1 parent 20f5888 commit 3a142f6

File tree

11 files changed

+285
-4
lines changed

11 files changed

+285
-4
lines changed

README.md

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,17 +15,23 @@
1515

1616
## Installation
1717

18-
Download the latest installer (`cloudsqlctl-setup.exe`) from the [Releases](https://github.com/Kinin-Code-Offical/cloudsqlctl/releases) page.
18+
Primary distribution is via GitHub Releases:
19+
- Download the latest installer (`cloudsqlctl-setup.exe`) from the [Releases](https://github.com/Kinin-Code-Offical/cloudsqlctl/releases) page.
20+
21+
Optional/community distribution:
22+
- Scoop: see `scoop/README.md`
23+
- Winget/Chocolatey: see `docs/Distribution.md`
1924

2025
## Documentation
2126

2227
Full documentation is available in the [docs](docs/) folder:
2328

2429
- [**Wiki Home**](docs/Home.md)
2530
- [Installation Guide](docs/Installation.md)
26-
- [Configuration & Setup](docs/Configuration.md)
27-
- [Command Reference](docs/commands.md)
28-
- [Troubleshooting](docs/Troubleshooting.md)
31+
- [Configuration & Setup](docs/Configuration.md)
32+
- [Command Reference](docs/commands.md)
33+
- [Distribution](docs/Distribution.md)
34+
- [Troubleshooting](docs/Troubleshooting.md)
2935

3036
## Quick Start
3137

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<package xmlns="http://schemas.microsoft.com/packaging/2015/06/nuspec.xsd">
3+
<metadata>
4+
<id>cloudsqlctl</id>
5+
<version>0.4.15</version>
6+
<title>CloudSQLCTL</title>
7+
<authors>Kinin-Code-Offical</authors>
8+
<owners>Kinin-Code-Offical</owners>
9+
<license type="expression">MIT</license>
10+
<projectUrl>https://github.com/Kinin-Code-Offical/cloudsqlctl</projectUrl>
11+
<requireLicenseAcceptance>false</requireLicenseAcceptance>
12+
<description>Windows-native CLI to install, update, and manage Google Cloud SQL Auth Proxy via gcloud.</description>
13+
<tags>windows cli gcloud cloud-sql</tags>
14+
</metadata>
15+
<files>
16+
<file src="tools\**" target="tools" />
17+
</files>
18+
</package>
19+
20+
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
VERIFICATION
2+
============
3+
4+
This package downloads the release zip from:
5+
https://github.com/Kinin-Code-Offical/cloudsqlctl/releases
6+
7+
To verify contents:
8+
1) Download the matching `SHA256SUMS.txt` for the release tag.
9+
2) Confirm the zip hash matches the entry for `cloudsqlctl-windows-x64.zip`.
10+
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
$ErrorActionPreference = 'Stop'
2+
3+
$packageName = 'cloudsqlctl'
4+
$packageVersion = '0.4.15'
5+
6+
$zipUrl = "https://github.com/Kinin-Code-Offical/cloudsqlctl/releases/download/v$packageVersion/cloudsqlctl-windows-x64.zip"
7+
$zipSha256 = 'ec77bf329e2ff67d25d33877ac0a13a1f4c8fccf39bb00cc2fde139a9ea9ad11'
8+
9+
$toolsDir = Split-Path -Parent $MyInvocation.MyCommand.Definition
10+
11+
Install-ChocolateyZipPackage -PackageName $packageName -Url $zipUrl -UnzipLocation $toolsDir -Checksum $zipSha256 -ChecksumType 'sha256'
12+
13+
$exePath = Join-Path $toolsDir 'cloudsqlctl.exe'
14+
Install-BinFile -Name 'cloudsqlctl' -Path $exePath
15+
16+
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
$ErrorActionPreference = 'Stop'
2+
3+
Uninstall-BinFile -Name 'cloudsqlctl'
4+

distribution/winget/README.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
# Winget manifest template
2+
3+
Winget publishing requires submitting a PR to `microsoft/winget-pkgs`.
4+
5+
This folder contains a minimal manifest template you can adapt for the current version and submit upstream.
6+
7+
Typical update steps:
8+
9+
1. Update `PackageVersion` and `InstallerSha256` in `cloudsqlctl.yaml`.
10+
2. Ensure the download URL points to the GitHub Release installer for that version.
11+
3. Submit a PR to `https://github.com/microsoft/winget-pkgs`.
12+
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
PackageIdentifier: KininCodeOffical.CloudSQLCTL
2+
PackageVersion: 0.4.15
3+
PackageName: CloudSQLCTL
4+
Publisher: Kinin-Code-Offical
5+
License: MIT
6+
ShortDescription: Windows-native CLI to install, update, and manage Google Cloud SQL Auth Proxy via gcloud.
7+
PackageUrl: https://github.com/Kinin-Code-Offical/cloudsqlctl
8+
InstallerType: inno
9+
Installers:
10+
- Architecture: x64
11+
InstallerUrl: https://github.com/Kinin-Code-Offical/cloudsqlctl/releases/download/v0.4.15/cloudsqlctl-setup.exe
12+
InstallerSha256: 999c07b5957a70decc9754d7199dfef82c89cf1bdfa5d22ce0be7f6273a09d63
13+
ManifestType: singleton
14+
ManifestVersion: 1.6.0
15+
16+

docs/Distribution.md

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
# Distribution (Winget / Chocolatey / Scoop)
2+
3+
This project primarily distributes releases via GitHub Releases.
4+
5+
Additional package-manager distribution is optional and may require maintainers to publish to external registries.
6+
7+
## Scoop (bucket in this repo)
8+
9+
This repo includes a Scoop bucket manifest:
10+
- `scoop/cloudsqlctl.json`
11+
12+
Install:
13+
14+
```powershell
15+
scoop bucket add cloudsqlctl https://github.com/Kinin-Code-Offical/cloudsqlctl
16+
scoop install cloudsqlctl/cloudsqlctl
17+
```
18+
19+
## Chocolatey (package skeleton in this repo)
20+
21+
This repo includes a Chocolatey package skeleton under:
22+
- `chocolatey/cloudsqlctl`
23+
24+
It is intended for maintainers to pack and publish (or for local/internal use).
25+
26+
## Winget (template)
27+
28+
Winget publishing is done via PRs to `microsoft/winget-pkgs`.
29+
30+
This repo includes a template manifest under:
31+
- `distribution/winget/cloudsqlctl.yaml`
32+
33+
## Updating manifests
34+
35+
Use:
36+
37+
```powershell
38+
powershell -ExecutionPolicy Bypass -File tools/update-distribution.ps1 -Version 0.4.15
39+
```
40+

scoop/README.md

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
# Scoop bucket (in this repo)
2+
3+
This repository includes a small Scoop bucket so you can install `cloudsqlctl` via Scoop without waiting for external registries.
4+
5+
## Install
6+
7+
```powershell
8+
scoop bucket add cloudsqlctl https://github.com/Kinin-Code-Offical/cloudsqlctl
9+
scoop install cloudsqlctl/cloudsqlctl
10+
```
11+
12+
## Update
13+
14+
```powershell
15+
scoop update
16+
scoop update cloudsqlctl
17+
```
18+

scoop/cloudsqlctl.json

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
{
2+
"version": "0.4.15",
3+
"description": "Windows-native CLI to install, update, and manage Google Cloud SQL Auth Proxy via gcloud.",
4+
"homepage": "https://github.com/Kinin-Code-Offical/cloudsqlctl",
5+
"license": "MIT",
6+
"url": "https://github.com/Kinin-Code-Offical/cloudsqlctl/releases/download/v0.4.15/cloudsqlctl-windows-x64.zip",
7+
"hash": "e6a65a7cec3a858bc3affb002e07ee04c09fd6ac42beac5811458deedd62ef84",
8+
"bin": [
9+
"cloudsqlctl.exe"
10+
]
11+
}

0 commit comments

Comments
 (0)