diff --git a/.github/workflows/check.yml b/.github/workflows/check.yml index 8105a1f..d547504 100644 --- a/.github/workflows/check.yml +++ b/.github/workflows/check.yml @@ -94,11 +94,14 @@ jobs: uses: actions/checkout@v5 with: ref: ${{ github.sha }} + fetch-depth: 0 - name: Check commit count run: | - COUNT=$(git rev-list --count HEAD ^origin/master) - if [ "$COUNT" -ne 1 ]; then - echo "Release branch must contain exactly one commit, found $COUNT" + BASE="${{ github.event.pull_request.base.sha }}" + HEAD="${{ github.event.pull_request.head.sha }}" + COMMITS=$(git rev-list --count $HEAD ^$BASE) + if [ "$COMMITS" -ne 1 ]; then + echo "Release branch must contain exactly one commit, found $COMMITS" exit 1 fi diff --git a/.github/workflows/commit.yml b/.github/workflows/commit.yml index 0a6761c..cf8bffd 100644 --- a/.github/workflows/commit.yml +++ b/.github/workflows/commit.yml @@ -46,9 +46,9 @@ jobs: - name: Get commit messages run: | - base="${{ github.event.pull_request.base.sha }}" - head="${{ github.event.pull_request.head.sha }}" - git log "${base}..${head}" --format=%h > commits.txt + BASE="${{ github.event.pull_request.base.sha }}" + HEAD="${{ github.event.pull_request.head.sha }}" + git log "$BASE..$HEAD" --format=%h > commits.txt - name: Validate commit messages run: | diff --git a/Cargo.lock b/Cargo.lock index aeda1c9..d8b8c77 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -597,7 +597,7 @@ checksum = "f52b00d39961fc5b2736ea853c9cc86238e165017a493d1d5c8eac6bdc4cc273" [[package]] name = "mono" -version = "0.0.1" +version = "0.0.2" dependencies = [ "clap", "cliclack", @@ -612,7 +612,7 @@ dependencies = [ [[package]] name = "mono-changeset" -version = "0.0.1" +version = "0.0.2" dependencies = [ "globset", "mono-project", @@ -623,7 +623,7 @@ dependencies = [ [[package]] name = "mono-project" -version = "0.0.1" +version = "0.0.2" dependencies = [ "glob", "semver", @@ -637,7 +637,7 @@ dependencies = [ [[package]] name = "mono-repository" -version = "0.0.1" +version = "0.0.2" dependencies = [ "git2", "semver", diff --git a/Cargo.toml b/Cargo.toml index 7034906..473ab2b 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -39,9 +39,9 @@ all = { level = "warn", priority = -1 } pedantic = { level = "warn", priority = -1 } [workspace.dependencies] -mono-changeset = { version = "0.0.1", path = "crates/mono-changeset" } -mono-project = { version = "0.0.1", path = "crates/mono-project" } -mono-repository = { version = "0.0.1", path = "crates/mono-repository" } +mono-changeset = { version = "0.0.2", path = "crates/mono-changeset" } +mono-project = { version = "0.0.2", path = "crates/mono-project" } +mono-repository = { version = "0.0.2", path = "crates/mono-repository" } clap = { version = "4.5", features = ["derive"] } cliclack = "0.3" diff --git a/crates/mono-changeset/Cargo.toml b/crates/mono-changeset/Cargo.toml index 19b4914..9695eb6 100644 --- a/crates/mono-changeset/Cargo.toml +++ b/crates/mono-changeset/Cargo.toml @@ -23,7 +23,7 @@ [package] name = "mono-changeset" -version = "0.0.1" +version = "0.0.2" description = "Mono repository changeset utilities" edition.workspace = true rust-version.workspace = true diff --git a/crates/mono-project/Cargo.toml b/crates/mono-project/Cargo.toml index 8368726..0e21784 100644 --- a/crates/mono-project/Cargo.toml +++ b/crates/mono-project/Cargo.toml @@ -23,7 +23,7 @@ [package] name = "mono-project" -version = "0.0.1" +version = "0.0.2" description = "Mono repository project utilities" edition.workspace = true rust-version.workspace = true diff --git a/crates/mono-repository/Cargo.toml b/crates/mono-repository/Cargo.toml index b4230d2..f2b69fe 100644 --- a/crates/mono-repository/Cargo.toml +++ b/crates/mono-repository/Cargo.toml @@ -23,7 +23,7 @@ [package] name = "mono-repository" -version = "0.0.1" +version = "0.0.2" description = "Mono repository git utilities" edition.workspace = true rust-version.workspace = true diff --git a/crates/mono/Cargo.toml b/crates/mono/Cargo.toml index f32cef4..e52682d 100644 --- a/crates/mono/Cargo.toml +++ b/crates/mono/Cargo.toml @@ -23,7 +23,7 @@ [package] name = "mono" -version = "0.0.1" +version = "0.0.2" description = "Mono repository automation toolkit" edition.workspace = true rust-version.workspace = true