ci: Modified the CI/CD pipeline to bump the procedural macros as well
This commit is contained in:
@@ -8,9 +8,9 @@ on:
|
||||
workflow_dispatch:
|
||||
inputs:
|
||||
bump_type:
|
||||
description: "Specify the type of version bump"
|
||||
description: 'Specify the type of version bump'
|
||||
required: true
|
||||
default: "patch"
|
||||
default: 'patch'
|
||||
type: choice
|
||||
options:
|
||||
- patch
|
||||
@@ -46,7 +46,7 @@ jobs:
|
||||
- name: Set up Python
|
||||
uses: actions/setup-python@v4
|
||||
with:
|
||||
python-version: "3.10"
|
||||
python-version: '3.10'
|
||||
|
||||
- name: Install Commitizen
|
||||
run: |
|
||||
@@ -126,6 +126,86 @@ jobs:
|
||||
echo "No changes to commit (already at $VERSION)"
|
||||
fi
|
||||
|
||||
- name: Bump validate_theme_derive/Cargo.toml version
|
||||
shell: bash
|
||||
working-directory: ${{ github.workspace }}/proc_macros/validate_theme_derive
|
||||
env:
|
||||
VERSION: ${{ env.version }}
|
||||
run: |
|
||||
set -euo pipefail
|
||||
: "${VERSION:?env.version is empty}"
|
||||
|
||||
# Ignore Act's local artifact dir noise
|
||||
echo artifacts/ >> .git/info/exclude || true
|
||||
|
||||
# Edit the version line right after name="managarr"
|
||||
sed -E -i '
|
||||
/^[[:space:]]*name[[:space:]]*=[[:space:]]*"managarr"[[:space:]]*$/ {
|
||||
n
|
||||
s|^[[:space:]]*version[[:space:]]*=[[:space:]]*"[^"]*"|version = "'"$VERSION"'"|
|
||||
}
|
||||
' Cargo.toml
|
||||
|
||||
cargo update || true
|
||||
|
||||
# Git config that helps in containers (Act)
|
||||
git config user.name "github-actions[bot]"
|
||||
git config user.email "github-actions[bot]@users.noreply.github.com"
|
||||
git config --global --add safe.directory "$GITHUB_WORKSPACE"
|
||||
|
||||
# Debug: show what changed
|
||||
git status --porcelain
|
||||
git diff --name-only -- Cargo.toml || true
|
||||
|
||||
# Only commit if one of these files actually changed
|
||||
if ! git diff --quiet -- Cargo.toml; then
|
||||
# Stage only modifications of already tracked files (won't pick up artifacts/)
|
||||
git add -u -- Cargo.toml
|
||||
git commit -m "chore: bump validate_theme_derive Cargo.toml to $VERSION"
|
||||
else
|
||||
echo "No changes to commit (already at $VERSION)"
|
||||
fi
|
||||
|
||||
- name: Bump enum_display_style_derive/Cargo.toml version
|
||||
shell: bash
|
||||
working-directory: ${{ github.workspace }}/proc_macros/enum_display_style_derive
|
||||
env:
|
||||
VERSION: ${{ env.version }}
|
||||
run: |
|
||||
set -euo pipefail
|
||||
: "${VERSION:?env.version is empty}"
|
||||
|
||||
# Ignore Act's local artifact dir noise
|
||||
echo artifacts/ >> .git/info/exclude || true
|
||||
|
||||
# Edit the version line right after name="managarr"
|
||||
sed -E -i '
|
||||
/^[[:space:]]*name[[:space:]]*=[[:space:]]*"managarr"[[:space:]]*$/ {
|
||||
n
|
||||
s|^[[:space:]]*version[[:space:]]*=[[:space:]]*"[^"]*"|version = "'"$VERSION"'"|
|
||||
}
|
||||
' Cargo.toml
|
||||
|
||||
cargo update || true
|
||||
|
||||
# Git config that helps in containers (Act)
|
||||
git config user.name "github-actions[bot]"
|
||||
git config user.email "github-actions[bot]@users.noreply.github.com"
|
||||
git config --global --add safe.directory "$GITHUB_WORKSPACE"
|
||||
|
||||
# Debug: show what changed
|
||||
git status --porcelain
|
||||
git diff --name-only -- Cargo.toml || true
|
||||
|
||||
# Only commit if one of these files actually changed
|
||||
if ! git diff --quiet -- Cargo.toml; then
|
||||
# Stage only modifications of already tracked files (won't pick up artifacts/)
|
||||
git add -u -- Cargo.toml
|
||||
git commit -m "chore: bump enum_display_style_derive Cargo.toml to $VERSION"
|
||||
else
|
||||
echo "No changes to commit (already at $VERSION)"
|
||||
fi
|
||||
|
||||
- name: Generate changelog for the version bump
|
||||
id: changelog
|
||||
run: |
|
||||
@@ -153,6 +233,8 @@ jobs:
|
||||
path: |
|
||||
Cargo.toml
|
||||
Cargo.lock
|
||||
proc_macros/validate_theme_derive/Cargo.toml
|
||||
proc_macros/enum_display_style_derive/Cargo.toml
|
||||
|
||||
build-release-artifacts:
|
||||
name: build-release
|
||||
@@ -373,7 +455,7 @@ jobs:
|
||||
artifacts/managarr-armv7-musl.tar.gz
|
||||
artifacts/managarr-armv7-musl.sha256
|
||||
tag_name: v${{ env.RELEASE_VERSION }}
|
||||
name: "v${{ env.RELEASE_VERSION }}"
|
||||
name: 'v${{ env.RELEASE_VERSION }}'
|
||||
body: ${{ env.changelog_body }}
|
||||
draft: false
|
||||
prerelease: false
|
||||
|
||||
Generated
+9
-9
@@ -610,6 +610,8 @@ dependencies = [
|
||||
[[package]]
|
||||
name = "enum_display_style_derive"
|
||||
version = "0.1.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "583f1f514d2754010ff71ed6853068cacbe43cc142cc076aa1b871d9754efc48"
|
||||
dependencies = [
|
||||
"darling",
|
||||
"quote",
|
||||
@@ -618,9 +620,7 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "enum_display_style_derive"
|
||||
version = "0.1.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "583f1f514d2754010ff71ed6853068cacbe43cc142cc076aa1b871d9754efc48"
|
||||
version = "0.6.1"
|
||||
dependencies = [
|
||||
"darling",
|
||||
"quote",
|
||||
@@ -1375,7 +1375,7 @@ dependencies = [
|
||||
"derive_setters",
|
||||
"deunicode",
|
||||
"dirs-next",
|
||||
"enum_display_style_derive 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"enum_display_style_derive 0.1.0",
|
||||
"human-panic",
|
||||
"indicatif",
|
||||
"indoc",
|
||||
@@ -1401,7 +1401,7 @@ dependencies = [
|
||||
"tokio",
|
||||
"tokio-util",
|
||||
"urlencoding",
|
||||
"validate_theme_derive 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"validate_theme_derive 0.1.0",
|
||||
"veil",
|
||||
]
|
||||
|
||||
@@ -2859,18 +2859,18 @@ dependencies = [
|
||||
[[package]]
|
||||
name = "validate_theme_derive"
|
||||
version = "0.1.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "40630259c022600210096da9538abcb992b801e30b464cb9d19f19ef0e0d09b9"
|
||||
dependencies = [
|
||||
"log",
|
||||
"quote",
|
||||
"syn 2.0.106",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "validate_theme_derive"
|
||||
version = "0.1.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "40630259c022600210096da9538abcb992b801e30b464cb9d19f19ef0e0d09b9"
|
||||
version = "0.6.1"
|
||||
dependencies = [
|
||||
"log",
|
||||
"quote",
|
||||
"syn 2.0.106",
|
||||
]
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
[package]
|
||||
name = "enum_display_style_derive"
|
||||
version = "0.1.0"
|
||||
version = "0.6.1"
|
||||
edition = "2024"
|
||||
authors = ["Alex Clarke <alex.j.tusa@gmail.com>"]
|
||||
description = "A proc-macro to derive a `Display` and `FromStr` implementation for enums with a `style` attribute."
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
[package]
|
||||
name = "validate_theme_derive"
|
||||
version = "0.1.0"
|
||||
version = "0.6.1"
|
||||
edition = "2024"
|
||||
authors = ["Alex Clarke <alex.j.tusa@gmail.com>"]
|
||||
description = "A proc-macro to validate a theme."
|
||||
|
||||
Reference in New Issue
Block a user