Skip to content

Commit

Permalink
Merge pull request #17 from bodo-run/brew-version-automation
Browse files Browse the repository at this point in the history
Brew version automation
  • Loading branch information
mohsen1 authored Jan 19, 2025
2 parents c82cff7 + 78a384c commit 8c9d2ad
Show file tree
Hide file tree
Showing 6 changed files with 46 additions and 41 deletions.
12 changes: 0 additions & 12 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,6 @@ jobs:
os: windows-latest
runs-on: ${{ matrix.os }}
steps:
- name: Clean existing tags
run: rm -rf .git/refs/tags/

- uses: actions/checkout@v3
with:
fetch-depth: 0
Expand Down Expand Up @@ -90,9 +87,6 @@ jobs:
needs: build
runs-on: ubuntu-latest
steps:
- name: Clean existing tags
run: rm -rf .git/refs/tags/

- uses: actions/checkout@v3
with:
fetch-depth: 0
Expand Down Expand Up @@ -138,9 +132,3 @@ jobs:
generate_release_notes: true
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Cleanup tags
run: |
git fetch --prune --prune-tags
git tag -l | xargs -r git tag -d
git fetch --tags
27 changes: 27 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,32 @@
# Changelog

## [0.13.1] - 2025-01-19

### Features


### Bug Fixes


### Other Changes

- chore(release): bump version to 0.13.1


## [0.7.5] - 2025-01-19

### Features


### Bug Fixes

- fix: manually update Formula version

### Other Changes

- perf show


## [0.7.4] - 2025-01-19

### Features
Expand Down
2 changes: 1 addition & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "yek"
version = "0.7.4"
version = "0.13.1"
edition = "2021"

[dependencies]
Expand Down
4 changes: 2 additions & 2 deletions Formula/yek.rb
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
class Yek < Formula
desc "A tool to chunk and serialize repository content for LLM consumption"
homepage "https://github.com/bodo-run/yek"
version "0.13.0"
version "0.13.1"
head "https://github.com/bodo-run/yek.git", branch: "main"

on_macos do
if Hardware::CPU.arm?
url "https://github.com/bodo-run/yek/releases/download/v#{version}/yek-aarch64-apple-darwin.tar.gz"
sha256 "9e01df0cd7ac448c5341c7156d2f97deeeaeb4197f891ebe5f15e9867ef50352" # arm64
sha256 "110971f28072cb5276e5fe5b5cefa9c35057233cf294662fbf9ee77ee2968b70" # arm64
else
url "https://github.com/bodo-run/yek/releases/download/v#{version}/yek-x86_64-apple-darwin.tar.gz"
sha256 "34896ad65e8ae7c5e93d90e87f15656b67ed5b7596492863d1da80e548ba7301" # x86_64
Expand Down
40 changes: 15 additions & 25 deletions src/parallel.rs
Original file line number Diff line number Diff line change
Expand Up @@ -248,45 +248,35 @@ fn collect_files(
let gitignore_path = rel_path
.to_str()
.map(|s| s.replace('\\', "/"))
.map(PathBuf::from)
.unwrap_or(rel_path.to_path_buf());
.unwrap_or_else(|| rel_str.to_string());

#[cfg(not(windows))]
let gitignore_path = rel_path.to_path_buf();
let gitignore_path = rel_str.to_string();

if gitignore.matched(&gitignore_path, false).is_ignore() {
debug!("Skipping {} - matched by gitignore", rel_str);
if gitignore.matched(&path, path.is_dir()).is_ignore() {
continue;
}

// Skip if matched by our ignore patterns
let mut skip = false;
for pat in ignore_patterns {
if pat.is_match(&rel_str) {
debug!("Skipping {} - matched ignore pattern", rel_str);
skip = true;
break;
}
}
if skip {
// Skip if matched by custom ignore patterns
if ignore_patterns.iter().any(|p| p.is_match(&rel_str)) {
continue;
}

// Skip binary files - do this check early to avoid double reads later
let binary_extensions = config
.map(|c| c.binary_extensions.as_slice())
.unwrap_or(&[]);
if !is_text_file(&path, binary_extensions) {
debug!("Skipping binary file: {}", rel_str);
// Skip binary files
if !is_text_file(
&path,
config.map(|c| &c.binary_extensions[..]).unwrap_or(&[]),
) {
continue;
}

// Calculate priority score
// Calculate priority
let mut priority = get_file_priority(&rel_str, ignore_patterns, priority_list);

// Apply git recentness boost
// Apply recentness boost if available
if let Some(boost_map) = recentness_boost {
if let Some(boost) = boost_map.get(&rel_str.to_string()) {
priority += *boost;
if let Some(boost) = boost_map.get(&gitignore_path) {
priority += boost;
}
}

Expand Down

0 comments on commit 8c9d2ad

Please sign in to comment.