Skip to content

Commit

Permalink
Rename project to prefligit
Browse files Browse the repository at this point in the history
  • Loading branch information
j178 committed Dec 3, 2024
1 parent 247ed4a commit f5d431d
Show file tree
Hide file tree
Showing 14 changed files with 196 additions and 176 deletions.
14 changes: 7 additions & 7 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -57,19 +57,19 @@ jobs:
# actions/checkout does not let us clone into anywhere outside ${{ github.workspace }}, so we have to copy the clone...
- name: Copy Git Repo to Dev Drive
run: |
Copy-Item -Path "${{ github.workspace }}" -Destination "${{ env.PRE_COMMIT_WORKSPACE }}" -Recurse
Copy-Item -Path "${{ github.workspace }}" -Destination "${{ env.PREFLIGIT_WORKSPACE }}" -Recurse
- uses: Swatinem/rust-cache@v2
with:
# Add a key to invalidate previous caches.
key: 1
workspaces: ${{ env.PRE_COMMIT_WORKSPACE }}
workspaces: ${{ env.PREFLIGIT_WORKSPACE }}

- name: "Install Rust toolchain"
run: rustup component add clippy

- name: "Clippy"
working-directory: ${{ env.PRE_COMMIT_WORKSPACE }}
working-directory: ${{ env.PREFLIGIT_WORKSPACE }}
run: cargo clippy --workspace --all-targets --all-features --locked -- -D warnings

cargo-shear:
Expand Down Expand Up @@ -151,14 +151,14 @@ jobs:
# actions/checkout does not let us clone into anywhere outside ${{ github.workspace }}, so we have to copy the clone...
- name: Copy Git Repo to Dev Drive
run: |
Copy-Item -Path "${{ github.workspace }}" -Destination "${{ env.PRE_COMMIT_WORKSPACE }}" -Recurse
Copy-Item -Path "${{ github.workspace }}" -Destination "${{ env.PREFLIGIT_WORKSPACE }}" -Recurse
- uses: Swatinem/rust-cache@v2
with:
workspaces: ${{ env.PRE_COMMIT_WORKSPACE }}
workspaces: ${{ env.PREFLIGIT_WORKSPACE }}

- name: "Install Rust toolchain"
working-directory: ${{ env.PRE_COMMIT_WORKSPACE }}
working-directory: ${{ env.PREFLIGIT_WORKSPACE }}
run: rustup show

- name: "Install cargo nextest"
Expand All @@ -172,7 +172,7 @@ jobs:
cache-local-path: ${{ env.DEV_DRIVE }}/uv-cache

- name: "Cargo test"
working-directory: ${{ env.PRE_COMMIT_WORKSPACE }}
working-directory: ${{ env.PREFLIGIT_WORKSPACE }}
run: |
cargo nextest show-config test-groups
cargo nextest run --workspace --status-level skip --failure-output immediate --no-fail-fast -j 8 --final-status-level slow
10 changes: 5 additions & 5 deletions .github/workflows/setup-dev-drive.ps1
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# This creates a 10GB dev drive, and exports all required environment
# variables so that rustup, pre-commit and others all use the dev drive as much
# variables so that rustup, prefligit and others all use the dev drive as much
# as possible.
$Volume = New-VHD -Path C:/pre-commit_dev_drive.vhdx -SizeBytes 10GB |
$Volume = New-VHD -Path C:/prefligit_dev_drive.vhdx -SizeBytes 10GB |
Mount-VHD -Passthru |
Initialize-Disk -Passthru |
New-Partition -AssignDriveLetter -UseMaximumSize |
Expand All @@ -10,7 +10,7 @@ $Volume = New-VHD -Path C:/pre-commit_dev_drive.vhdx -SizeBytes 10GB |
Write-Output $Volume

$Drive = "$($Volume.DriveLetter):"
$Tmp = "$($Drive)/pre-commit-tmp"
$Tmp = "$($Drive)/prefligit-tmp"

# Create the directory ahead of time in an attempt to avoid race-conditions
New-Item $Tmp -ItemType Directory
Expand All @@ -19,8 +19,8 @@ Write-Output `
"DEV_DRIVE=$($Drive)" `
"TMP=$($Tmp)" `
"TEMP=$($Tmp)" `
"PRE_COMMIT_INTERNAL__TEST_DIR=$($Tmp)" `
"PREFLIGIT_INTERNAL__TEST_DIR=$($Tmp)" `
"RUSTUP_HOME=$($Drive)/.rustup" `
"CARGO_HOME=$($Drive)/.cargo" `
"PRE_COMMIT_WORKSPACE=$($Drive)/pre-commit" `
"PREFLIGIT_WORKSPACE=$($Drive)/prefligit" `
>> $env:GITHUB_ENV
28 changes: 28 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,33 @@
# Changelog

## 0.0.6

### Breaking changes

In this release, we’ve renamed the project to `prefligit` (a deliberate misspelling of preflight) to prevent confusion with the existing pre-commit tool. For further information, refer to issue #73.

- The command-line name is now `prefligit`. We suggest uninstalling any previous version of `pre-commit-rs` and installing `prefligit` from scratch.
- The PyPI package is now listed as [`prefligit`](https://pypi.org/project/prefligit/).
- The Cargo package is also now [`prefligit`](https://crates.io/crates/prefligit).
- The Homebrew formula has been updated to `prefligit`.

### Enhancements

- Support `docker_image` language ([#113](https://github.com/j178/pre-commit-rs/pull/113))
- Support `init-templatedir` subcommand ([#101](https://github.com/j178/pre-commit-rs/pull/101))
- Implement get filenames from merge conflicts ([#103](https://github.com/j178/pre-commit-rs/pull/103))

### Bug fixes

- Fix `prefligit install --hook-type` name ([#102](https://github.com/j178/pre-commit-rs/pull/102))

### Other changes

- Apply color option to log ([#100](https://github.com/j178/pre-commit-rs/pull/100))
- Improve tests ([#106](https://github.com/j178/pre-commit-rs/pull/106))
- Remove intermedia Language enum ([#107](https://github.com/j178/pre-commit-rs/pull/107))
- Run `cargo clippy` in the dev drive workspace ([#115](https://github.com/j178/pre-commit-rs/pull/115))

## 0.0.5

### Enhancements
Expand Down
Loading

0 comments on commit f5d431d

Please sign in to comment.