Skip to content

Commit fccf485

Browse files
marcnuluclaude
andcommitted
Add Chocolatey packaging, release workflow, and MIT license
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent 9e2a93e commit fccf485

9 files changed

Lines changed: 253 additions & 3 deletions

File tree

.github/workflows/release.yml

Lines changed: 134 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,134 @@
1+
name: Release
2+
3+
on:
4+
push:
5+
tags:
6+
- "v*"
7+
8+
permissions:
9+
contents: write
10+
11+
jobs:
12+
build-windows:
13+
runs-on: windows-latest
14+
steps:
15+
- uses: actions/checkout@v4
16+
17+
- name: Set up Rust
18+
uses: dtolnay/rust-toolchain@1.85.0
19+
with:
20+
profile: minimal
21+
22+
- name: Build (release)
23+
run: cargo build --release --locked
24+
25+
- name: Package Windows zip
26+
shell: pwsh
27+
run: |
28+
$version = "${{ github.ref_name }}"
29+
New-Item -ItemType Directory -Force -Path staging
30+
Copy-Item target/release/recur.exe staging/
31+
Copy-Item target/release/recur-git.exe staging/
32+
Copy-Item README.md staging/
33+
Compress-Archive -Path staging/* -DestinationPath "recur-${version}-x86_64-pc-windows-msvc.zip"
34+
35+
- name: Upload artifact
36+
uses: actions/upload-artifact@v4
37+
with:
38+
name: windows-zip
39+
path: recur-*.zip
40+
41+
build-linux:
42+
runs-on: ubuntu-latest
43+
steps:
44+
- uses: actions/checkout@v4
45+
46+
- name: Set up Rust
47+
uses: dtolnay/rust-toolchain@1.85.0
48+
with:
49+
profile: minimal
50+
51+
- name: Build (release)
52+
run: cargo build --release --locked
53+
54+
- name: Package Linux tarball
55+
run: |
56+
VERSION="${{ github.ref_name }}"
57+
mkdir staging
58+
cp target/release/recur staging/
59+
cp target/release/recur-git staging/
60+
cp README.md staging/
61+
tar czf "recur-${VERSION}-x86_64-unknown-linux-gnu.tar.gz" -C staging .
62+
63+
- name: Build .deb package
64+
run: |
65+
cargo install cargo-deb
66+
cargo deb --no-build
67+
68+
- name: Upload tarball
69+
uses: actions/upload-artifact@v4
70+
with:
71+
name: linux-tarball
72+
path: recur-*.tar.gz
73+
74+
- name: Upload deb
75+
uses: actions/upload-artifact@v4
76+
with:
77+
name: linux-deb
78+
path: target/debian/*.deb
79+
80+
release:
81+
needs: [build-windows, build-linux]
82+
runs-on: ubuntu-latest
83+
steps:
84+
- uses: actions/checkout@v4
85+
86+
- name: Download all artifacts
87+
uses: actions/download-artifact@v4
88+
with:
89+
path: artifacts
90+
91+
- name: Create GitHub Release
92+
uses: softprops/action-gh-release@v2
93+
with:
94+
generate_release_notes: true
95+
files: |
96+
artifacts/windows-zip/*.zip
97+
artifacts/linux-tarball/*.tar.gz
98+
artifacts/linux-deb/*.deb
99+
100+
chocolatey:
101+
needs: [release]
102+
runs-on: windows-latest
103+
if: github.event_name == 'push'
104+
steps:
105+
- uses: actions/checkout@v4
106+
107+
- name: Download Windows zip
108+
uses: actions/download-artifact@v4
109+
with:
110+
name: windows-zip
111+
path: artifacts
112+
113+
- name: Compute checksum and update install script
114+
shell: pwsh
115+
run: |
116+
$zip = Get-ChildItem artifacts/*.zip | Select-Object -First 1
117+
$hash = (Get-FileHash $zip -Algorithm SHA256).Hash
118+
$install = Get-Content choco/tools/chocolateyInstall.ps1 -Raw
119+
$install = $install -replace '%CHECKSUM64%', $hash
120+
Set-Content choco/tools/chocolateyInstall.ps1 $install
121+
122+
- name: Update version in nuspec
123+
shell: pwsh
124+
run: |
125+
$version = "${{ github.ref_name }}".TrimStart('v')
126+
$nuspec = Get-Content choco/recur.nuspec -Raw
127+
$nuspec = $nuspec -replace '<version>.*</version>', "<version>$version</version>"
128+
Set-Content choco/recur.nuspec $nuspec
129+
130+
- name: Pack Chocolatey package
131+
run: choco pack choco/recur.nuspec --output-directory choco/
132+
133+
- name: Push to Chocolatey
134+
run: choco push choco/recur.*.nupkg --source https://push.chocolatey.org/ --api-key ${{ secrets.CHOCOLATEY_API_KEY }}

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "recur"
3-
version = "0.2.0"
3+
version = "0.2.2"
44
edition = "2021"
55
authors = ["User Level Up Contributors"]
66
description = "Recursive hierarchical search tool for modern codebases - Honoring Dennis Ritchie's 1968 thesis (58 years of recursive hierarchies)"

LICENSE

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
MIT License
2+
3+
Copyright (c) 2025-2026 User Level Up Contributors
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<div align="center">
22
<h1>recur</h1>
3-
<div class="version">v0.1.16</div>
3+
<div class="version">v0.2.2</div>
44
<p>
55
<a href="https://opensource.org/licenses/MIT"><img alt="License: MIT" src="https://img.shields.io/badge/License-MIT-yellow.svg"></a>
66
<a href="https://www.rust-lang.org/"><img alt="Rust 1.70+" src="https://img.shields.io/badge/rust-1.70%2B-blue.svg"></a>

VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
a.0.2.0
1+
a.0.2.2

choco/recur.nuspec

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<package xmlns="http://schemas.chocolatey.org/2010/07/nuspec">
3+
<metadata>
4+
<id>recur</id>
5+
<version>0.2.1</version>
6+
<title>recur</title>
7+
<authors>User Level Up Contributors</authors>
8+
<owners>userlevelup</owners>
9+
<summary>Recursive, hierarchy-aware search for modern codebases</summary>
10+
<description><![CDATA[**recur** is a command-line tool for working with hierarchically named code: files, modules, and identifiers that encode structure using dot-separated or custom naming conventions.
11+
12+
While tools like `grep` and `ripgrep` excel at fast text matching, they treat results as flat lists. `recur` complements them by understanding hierarchy — so you can search, navigate, and analyze related code as a structured system.
13+
14+
## Features
15+
- Hierarchy-aware pattern matching with `*` and `**` wildcards
16+
- Multi-separator merge — unify results across naming conventions (`.` and `_`)
17+
- Unix pipe composability — stdin mode for pure pipe workflows
18+
- Scoped text search within a hierarchy (grep-like, but structure-aware)
19+
- Tree visualization using Unicode box-drawing characters
20+
- Related file discovery (siblings within the hierarchy)
21+
- JSON output for tooling integration
22+
23+
## Commands
24+
- `recur files` — find files by hierarchical pattern
25+
- `recur find` — search text within a hierarchy scope
26+
- `recur tree` — visualize hierarchy as a tree
27+
- `recur related` — find sibling files
28+
- `recur children` — find child files
29+
- `recur id` — search for hierarchical identifiers
30+
- `recur stats` — analyze hierarchy statistics
31+
- `recur merge` — merge results across separators
32+
33+
Inspired by Dennis M. Ritchie's 1968 work on recursive hierarchies and program structure.
34+
]]></description>
35+
<projectUrl>https://github.com/userlevelup/recur</projectUrl>
36+
<projectSourceUrl>https://github.com/userlevelup/recur</projectSourceUrl>
37+
<bugTrackerUrl>https://github.com/userlevelup/recur/issues</bugTrackerUrl>
38+
<docsUrl>https://github.com/userlevelup/recur#readme</docsUrl>
39+
<tags>search grep hierarchy recursive tree cli developer-tools rust</tags>
40+
<licenseUrl>https://github.com/userlevelup/recur/blob/main/LICENSE</licenseUrl>
41+
<requireLicenseAcceptance>false</requireLicenseAcceptance>
42+
<packageSourceUrl>https://github.com/userlevelup/recur/tree/main/choco</packageSourceUrl>
43+
</metadata>
44+
<files>
45+
<file src="tools\**" target="tools" />
46+
</files>
47+
</package>

choco/tools/VERIFICATION.txt

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
VERIFICATION
2+
3+
To verify the package contents:
4+
5+
1. Download the binary directly from the GitHub release:
6+
https://github.com/userlevelup/recur/releases
7+
8+
2. Compare the SHA256 checksum of the downloaded zip with the
9+
checksum embedded in chocolateyInstall.ps1.
10+
11+
3. You can also build from source:
12+
git clone https://github.com/userlevelup/recur
13+
cd recur
14+
cargo build --release --locked
15+
16+
The source code is available at:
17+
https://github.com/userlevelup/recur
18+
19+
Licensed under MIT.

choco/tools/chocolateyInstall.ps1

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
$ErrorActionPreference = 'Stop'
2+
3+
$packageName = 'recur'
4+
$version = $env:chocolateyPackageVersion
5+
6+
$url64 = "https://github.com/userlevelup/recur/releases/download/v${version}/recur-v${version}-x86_64-pc-windows-msvc.zip"
7+
8+
$installDir = "$(Split-Path -Parent $MyInvocation.MyCommand.Definition)"
9+
10+
$packageArgs = @{
11+
packageName = $packageName
12+
unzipLocation = $installDir
13+
url64bit = $url64
14+
checksumType64 = 'sha256'
15+
checksum64 = '%CHECKSUM64%'
16+
}
17+
18+
Install-ChocolateyZipPackage @packageArgs
19+
20+
# Add shim for recur-git as well if it exists in the zip
21+
$recurGit = Join-Path $installDir 'recur-git.exe'
22+
if (Test-Path $recurGit) {
23+
Install-BinFile -Name 'recur-git' -Path $recurGit
24+
}
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
$ErrorActionPreference = 'Stop'
2+
3+
$packageName = 'recur'
4+
5+
Uninstall-BinFile -Name 'recur-git'

0 commit comments

Comments
 (0)