chore: release v0.6.9

This commit is contained in:
2026-05-28 15:18:03 +08:00
parent c59d6de54f
commit 9fd1652ebb
7 changed files with 294 additions and 215 deletions

View File

@@ -13,7 +13,6 @@ permissions:
jobs: jobs:
update-packages-index: update-packages-index:
runs-on: ubuntu-latest runs-on: ubuntu-latest
# Запускаем только если это ручной вызов ИЛИ если родительский релиз завершился успешно
if: ${{ github.event_name == 'workflow_dispatch' || github.event.workflow_run.conclusion == 'success' }} if: ${{ github.event_name == 'workflow_dispatch' || github.event.workflow_run.conclusion == 'success' }}
steps: steps:
@@ -24,8 +23,9 @@ jobs:
token: ${{ secrets.PACKAGES_REPO_TOKEN }} token: ${{ secrets.PACKAGES_REPO_TOKEN }}
path: 'central-packages' path: 'central-packages'
- name: Download built package artifact # --- СКАЧИВАНИЕ АРТЕФАКТОВ ИЗ РЕЛИЗА ---
# Этот шаг отработает только при автоматическом набеге из главного релиза
- name: Download Arch package artifact
if: ${{ github.event_name == 'workflow_run' }} if: ${{ github.event_name == 'workflow_run' }}
uses: actions/download-artifact@v4 uses: actions/download-artifact@v4
with: with:
@@ -33,9 +33,31 @@ jobs:
path: central-packages/archlinux/x86_64/ path: central-packages/archlinux/x86_64/
github-token: ${{ secrets.PACKAGES_REPO_TOKEN }} github-token: ${{ secrets.PACKAGES_REPO_TOKEN }}
run-id: ${{ github.event.workflow_run.id }} run-id: ${{ github.event.workflow_run.id }}
continue-on-error: true
- name: Download Debian package artifact
if: ${{ github.event_name == 'workflow_run' }}
uses: actions/download-artifact@v4
with:
name: debian-package
path: central-packages/debian/
github-token: ${{ secrets.PACKAGES_REPO_TOKEN }}
run-id: ${{ github.event.workflow_run.id }}
continue-on-error: true
- name: Download RPM package artifact
if: ${{ github.event_name == 'workflow_run' }}
uses: actions/download-artifact@v4
with:
name: rpm-package
path: central-packages/rpm/x86_64/
github-token: ${{ secrets.PACKAGES_REPO_TOKEN }}
run-id: ${{ github.event.workflow_run.id }}
continue-on-error: true
# --- ИНДЕКСАЦИЯ REPO ---
- name: Update Pacman Database (Inside Arch Container) - name: Update Pacman Database (Inside Arch Container)
# Запускаем изолированный контейнер Арча только ради одной команды repo-add
run: | run: |
docker run --rm \ docker run --rm \
-v ${{ github.workspace }}/central-packages:/packages \ -v ${{ github.workspace }}/central-packages:/packages \
@@ -43,33 +65,63 @@ jobs:
bash -c ' bash -c '
cd /packages/archlinux/x86_64 && \ cd /packages/archlinux/x86_64 && \
rm -f dexoron.db dexoron.files && \ rm -f dexoron.db dexoron.files && \
# Включаем nullglob, чтобы пустая маска *.pkg.tar.zst не превращалась в одноименную строку
shopt -s nullglob shopt -s nullglob
packages=(*.pkg.tar.zst) packages=(*.pkg.tar.zst)
# Проверяем, есть ли бинарные пакеты в папке
if [ ${#packages[@]} -gt 0 ]; then if [ ${#packages[@]} -gt 0 ]; then
echo "Found ${#packages[@]} packages. Updating database..." echo "Found ${#packages[@]} Arch packages. Updating database..."
repo-add dexoron.db.tar.gz "${packages[@]}" && \ repo-add dexoron.db.tar.gz "${packages[@]}" && \
ln -sf dexoron.db.tar.gz dexoron.db && \ ln -sf dexoron.db.tar.gz dexoron.db && \
ln -sf dexoron.files.tar.gz dexoron.files ln -sf dexoron.files.tar.gz dexoron.files
else else
echo "No .pkg.tar.zst files found in directory. Skipping database update." echo "No .pkg.tar.zst files found. Skipping."
fi fi
' '
- name: Update Debian APT Repository Index
run: |
sudo apt-get update && sudo apt-get install -y dpkg-dev
cd central-packages/debian
shopt -s nullglob
deb_packages=(*.deb)
if [ ${#deb_packages[@]} -gt 0 ]; then
echo "Found ${#deb_packages[@]} Debian packages. Generating Packages.gz..."
# Генерируем индекс для плоского (flat) репозитория
dpkg-scanpackages . /dev/null | gzip -9c > Packages.gz
else
echo "No .deb files found. Skipping Debian index update."
fi
- name: Update Fedora DNF Repository Index
run: |
sudo apt-get update && sudo apt-get install -y createrepo-c
cd central-packages/rpm/x86_64
shopt -s nullglob
rpm_packages=(*.rpm)
if [ ${#rpm_packages[@]} -gt 0 ]; then
echo "Found ${#rpm_packages[@]} RPM packages. Generating repodata..."
# Пересоздаем метаданные для dnf
createrepo_c .
else
echo "No .rpm files found. Skipping Fedora index update."
fi
# --- ПУШ ИЗМЕНЕНИЙ ---
- name: Push to dexoron/packages - name: Push to dexoron/packages
run: | run: |
cd central-packages cd central-packages
git config user.name "github-actions[bot]" git config user.name "github-actions[bot]"
git config user.email "41898282+github-actions[bot]@users.noreply.github.com" git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
# Проверяем, изменилось ли что-то, чтобы не плодить пустые коммиты # Проверяем изменения во всех трех целевых папках
if [ -n "$(git status --porcelain)" ]; then if [ -n "$(git status --porcelain)" ]; then
git add archlinux/ git add archlinux/ debian/ rpm/
git commit -m "chore(arch): update repository db with new packages" git commit -m "chore: update repositories index (arch, debian, rpm)"
git push git push
else else
echo "No changes detected in repository database." echo "No changes detected in repository databases."
fi fi

View File

@@ -10,11 +10,11 @@ on:
description: "Tag to build (e.g. v0.6.7)" description: "Tag to build (e.g. v0.6.7)"
required: true required: true
run_linux: run_linux:
description: "Build Linux (.deb, .rpm, .snap, binaries)" description: "Build Linux"
type: boolean type: boolean
default: true default: true
run_arch_native: run_linux_packages:
description: "Build Arch Linux Native (.pkg.tar.zst)" description: "Build Linux Packages (.deb, .rpm, .snap, .pkg.tar.zst)"
type: boolean type: boolean
default: true default: true
run_aur: run_aur:
@@ -100,7 +100,7 @@ jobs:
name: release-notes name: release-notes
path: .github/release-notes.md path: .github/release-notes.md
# ── Linux ────────────────────────────────────────────────────────────────── # ── Linux Binaries Matrix ──────────────────────────────────────────────────
build-linux: build-linux:
if: ${{ github.event_name == 'push' || github.event.inputs.run_linux == 'true' }} if: ${{ github.event_name == 'push' || github.event.inputs.run_linux == 'true' }}
needs: [setup, notes] needs: [setup, notes]
@@ -156,83 +156,149 @@ jobs:
body_path: .github/release-notes.md body_path: .github/release-notes.md
prerelease: ${{ needs.setup.outputs.prerelease == 'true' }} prerelease: ${{ needs.setup.outputs.prerelease == 'true' }}
# ── Linux Packages (.deb & .rpm) ─────────────────────────────────────────── # ── Linux Packages Matrix (.deb, .rpm, .pkg.tar.zst, .snap) ────────────────
build-deb-rpm: build-linux-packages:
if: ${{ github.event_name == 'push' || github.event.inputs.run_linux == 'true' }} if: ${{ github.event_name == 'push' || github.event.inputs.run_linux_packages == 'true' }}
needs: [setup, notes] needs: [setup, notes]
runs-on: ubuntu-latest runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
include:
- package_type: deb
artifact_name: debian-package
- package_type: rpm
artifact_name: rpm-package
- package_type: arch
artifact_name: arch-package
- package_type: snap
artifact_name: snap-package
steps: steps:
- uses: actions/checkout@v4 - uses: actions/checkout@v4
with: with:
ref: ${{ needs.setup.outputs.tag }} ref: ${{ needs.setup.outputs.tag }}
- name: Setup Rust (For non-container builds)
if: matrix.package_type != 'arch'
uses: dtolnay/rust-toolchain@stable
# ── DEB Build ──
- name: Build Debian Package
if: matrix.package_type == 'deb'
run: |
cargo install cargo-deb
cargo build --release
cargo deb --no-build
mkdir -p dist-packages && cp target/debian/*.deb dist-packages/
# ── RPM Build ──
- name: Build RPM Package
if: matrix.package_type == 'rpm'
run: |
cargo install cargo-generate-rpm
cargo build --release
cargo generate-rpm
mkdir -p dist-packages && cp target/generate-rpm/*.rpm dist-packages/
# ── Snap Build ──
- name: Build Snap Package
if: matrix.package_type == 'snap'
run: |
cargo build --release
mkdir -p dist && cp target/release/dcr dist/
- name: Snapcraft Build Action
if: matrix.package_type == 'snap'
uses: snapcore/action-build@v1
with:
path: packages/snap
- name: Prepare Snap Output
if: matrix.package_type == 'snap'
run: mkdir -p dist-packages && cp packages/snap/*.snap dist-packages/
# ── Arch Linux Native Build ──
- name: Build Arch Package inside Container
if: matrix.package_type == 'arch'
run: |
PKGVER='${{ needs.setup.outputs.version }}'
TAG='${{ needs.setup.outputs.tag }}'
SRC_URL="https://github.com/dexoron/dcr/archive/refs/tags/${TAG}.tar.gz"
SHA256="$(curl -fsSL "$SRC_URL" | sha256sum | awk '{print $1}')"
mkdir -p arch-build
cat > arch-build/PKGBUILD <<PKG
pkgname=dcr
pkgver=${PKGVER}
pkgrel=1
pkgdesc="Cargo-like utility to manage C/C++ projects"
arch=('x86_64')
url="https://github.com/dexoron/dcr"
license=('GPL-3.0-or-later')
depends=('gcc-libs')
makedepends=('cargo')
options=('!lto')
source=("\$pkgname-\$pkgver.tar.gz::\$url/archive/refs/tags/v\$pkgver.tar.gz")
sha256sums=('${SHA256}')
build() {
cd "\$srcdir/\$pkgname-\$pkgver"
cargo build --release --locked
}
package() {
cd "\$srcdir/\$pkgname-\$pkgver"
install -Dm755 "target/release/dcr" "\$pkgdir/usr/bin/dcr"
install -Dm644 LICENSE "\$pkgdir/usr/share/licenses/\$pkgname/LICENSE"
}
PKG
docker run --rm \
-v ${{ github.workspace }}/arch-build:/build \
archlinux:latest \
bash -c "
pacman -Syu --noconfirm base-devel cargo gcc-libs git && \
useradd -m builduser && \
echo 'builduser ALL=(ALL) NOPASSWD: ALL' >> /etc/sudoers && \
chown -R builduser:builduser /build && \
cd /build && \
su builduser -c 'makepkg -s --noconfirm'
"
mkdir -p dist-packages && cp arch-build/*.pkg.tar.zst dist-packages/
# ── Upload Artifacts ──
- name: Upload Package Artifact
uses: actions/upload-artifact@v4
with:
name: ${{ matrix.artifact_name }}
path: dist-packages/*
if-no-files-found: ignore
# ── Publish Packages to Release (Out of Matrix) ────────────────────────────
publish-dexoron-packages:
needs: [setup, notes, build-linux-packages]
runs-on: ubuntu-latest
steps:
- name: Download Release Notes - name: Download Release Notes
uses: actions/download-artifact@v4 uses: actions/download-artifact@v4
with: with:
name: release-notes name: release-notes
path: .github path: .github
- name: Setup Rust - name: Download Built Packages
uses: dtolnay/rust-toolchain@stable uses: actions/download-artifact@v4
with:
path: collected-packages
- name: Install Tools - name: Upload Everything to GitHub Release
run: |
cargo install cargo-deb
cargo install cargo-generate-rpm
- name: Build Native Release
run: cargo build --release
- name: Generate .deb Package
run: cargo deb --no-build
- name: Generate .rpm Package
run: cargo generate-rpm
- name: Upload Packages to Release
uses: softprops/action-gh-release@v2 uses: softprops/action-gh-release@v2
with: with:
tag_name: ${{ needs.setup.outputs.tag }} tag_name: ${{ needs.setup.outputs.tag }}
files: | files: |
target/debian/*.deb collected-packages/debian-package/*
target/generate-rpm/*.rpm collected-packages/rpm-package/*
collected-packages/arch-package/*
collected-packages/snap-package/*
body_path: .github/release-notes.md body_path: .github/release-notes.md
prerelease: ${{ needs.setup.outputs.prerelease == 'true' }} prerelease: ${{ needs.setup.outputs.prerelease == 'true' }}
# ── Snapcraft ────────────────────────────────────────────────────────────── # ── macOS Matrix ───────────────────────────────────────────────────────────
build-snap:
if: ${{ github.event_name == 'push' || github.event.inputs.run_linux == 'true' }}
needs: [setup, notes]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
ref: ${{ needs.setup.outputs.tag }}
- name: Setup Rust
uses: dtolnay/rust-toolchain@stable
- name: Build Release Binary
run: |
cargo build --release
# Создаем папки для контекста snapcraft, если внутри yaml завязан относительный путь
mkdir -p dist
cp target/release/dcr dist/
- name: Build Snap Package
uses: snapcore/action-build@v1
id: snapcraft
with:
path: packages/snap
- name: Upload Snap to Release
uses: softprops/action-gh-release@v2
with:
tag_name: ${{ needs.setup.outputs.tag }}
files: packages/snap/*.snap
prerelease: ${{ needs.setup.outputs.prerelease == 'true' }}
# ── macOS ──────────────────────────────────────────────────────────────────
build-macos: build-macos:
if: ${{ github.event_name == 'push' || github.event.inputs.run_macos == 'true' }} if: ${{ github.event_name == 'push' || github.event.inputs.run_macos == 'true' }}
needs: [setup, notes] needs: [setup, notes]
@@ -278,11 +344,15 @@ jobs:
body_path: .github/release-notes.md body_path: .github/release-notes.md
prerelease: ${{ needs.setup.outputs.prerelease == 'true' }} prerelease: ${{ needs.setup.outputs.prerelease == 'true' }}
# ── BSD Systems ──────────────────────────────────────────────────────────── # ── BSD Systems Matrix ─────────────────────────────────────────────────────
build-bsd: build-bsd:
if: ${{ github.event_name == 'push' || github.event.inputs.run_bsd == 'true' }} if: ${{ github.event_name == 'push' || github.event.inputs.run_bsd == 'true' }}
needs: [setup, notes] needs: [setup, notes]
runs-on: ubuntu-latest runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
system: [freebsd, openbsd, netbsd]
steps: steps:
- uses: actions/checkout@v4 - uses: actions/checkout@v4
with: with:
@@ -294,28 +364,26 @@ jobs:
name: release-notes name: release-notes
path: .github path: .github
# ── FreeBSD ── # --- FREEBSD ---
- name: Install cargo-zigbuild - name: Build in FreeBSD VM
run: | if: matrix.system == 'freebsd'
pip install cargo-zigbuild uses: vmactions/freebsd-vm@v1
echo "$HOME/.local/bin" >> $GITHUB_PATH
- name: Setup Rust (FreeBSD)
uses: dtolnay/rust-toolchain@stable
with: with:
targets: x86_64-unknown-freebsd usesh: true
run: |
- name: Build FreeBSD pkg install -y rust
run: cargo zigbuild --release --target x86_64-unknown-freebsd cargo build --release
- name: Prepare FreeBSD Artifact - name: Prepare FreeBSD Artifact
if: matrix.system == 'freebsd'
run: | run: |
ASSET="dcr-x86_64-unknown-freebsd-${{ needs.setup.outputs.version }}" ASSET="dcr-x86_64-unknown-freebsd-${{ needs.setup.outputs.version }}"
cp target/x86_64-unknown-freebsd/release/dcr "$ASSET" cp target/release/dcr "$ASSET"
echo "FREEBSD_ASSET=${ASSET}" >> "$GITHUB_ENV" echo "BSD_ASSET=${ASSET}" >> "$GITHUB_ENV"
# ── OpenBSD ── # --- OPENBSD ---
- name: Build in OpenBSD VM - name: Build in OpenBSD VM
if: matrix.system == 'openbsd'
uses: vmactions/openbsd-vm@v1 uses: vmactions/openbsd-vm@v1
with: with:
usesh: true usesh: true
@@ -324,13 +392,15 @@ jobs:
cargo build --release cargo build --release
- name: Prepare OpenBSD Artifact - name: Prepare OpenBSD Artifact
if: matrix.system == 'openbsd'
run: | run: |
ASSET="dcr-x86_64-unknown-openbsd-${{ needs.setup.outputs.version }}" ASSET="dcr-x86_64-unknown-openbsd-${{ needs.setup.outputs.version }}"
cp target/release/dcr "$ASSET" cp target/release/dcr "$ASSET"
echo "OPENBSD_ASSET=${ASSET}" >> "$GITHUB_ENV" echo "BSD_ASSET=${ASSET}" >> "$GITHUB_ENV"
# ── NetBSD ── # --- NETBSD ---
- name: Build in NetBSD VM - name: Build in NetBSD VM
if: matrix.system == 'netbsd'
uses: vmactions/netbsd-vm@v1 uses: vmactions/netbsd-vm@v1
with: with:
usesh: true usesh: true
@@ -339,24 +409,22 @@ jobs:
cargo build --release cargo build --release
- name: Prepare NetBSD Artifact - name: Prepare NetBSD Artifact
if: matrix.system == 'netbsd'
run: | run: |
ASSET="dcr-x86_64-unknown-netbsd-${{ needs.setup.outputs.version }}" ASSET="dcr-x86_64-unknown-netbsd-${{ needs.setup.outputs.version }}"
cp target/release/dcr "$ASSET" cp target/release/dcr "$ASSET"
echo "NETBSD_ASSET=${ASSET}" >> "$GITHUB_ENV" echo "BSD_ASSET=${ASSET}" >> "$GITHUB_ENV"
# ── Assets Upload ── # --- UPLOAD TARGET ---
- name: Upload Release Assets - name: Upload BSD Asset to Release
uses: softprops/action-gh-release@v2 uses: softprops/action-gh-release@v2
with: with:
tag_name: ${{ needs.setup.outputs.tag }} tag_name: ${{ needs.setup.outputs.tag }}
files: | files: ${{ env.BSD_ASSET }}
${{ env.FREEBSD_ASSET }}
${{ env.OPENBSD_ASSET }}
${{ env.NETBSD_ASSET }}
body_path: .github/release-notes.md body_path: .github/release-notes.md
prerelease: ${{ needs.setup.outputs.prerelease == 'true' }} prerelease: ${{ needs.setup.outputs.prerelease == 'true' }}
# ── Windows ──────────────────────────────────────────────────────────────── # ── Windows Matrix ─────────────────────────────────────────────────────────
build-windows: build-windows:
if: ${{ github.event_name == 'push' || github.event.inputs.run_windows == 'true' }} if: ${{ github.event_name == 'push' || github.event.inputs.run_windows == 'true' }}
needs: [setup, notes] needs: [setup, notes]
@@ -402,77 +470,6 @@ jobs:
body_path: .github/release-notes.md body_path: .github/release-notes.md
prerelease: ${{ needs.setup.outputs.prerelease == 'true' }} prerelease: ${{ needs.setup.outputs.prerelease == 'true' }}
# ── Arch Linux Native Package (.pkg.tar.zst) ───────────────────────────────
build-arch-package:
if: ${{ github.event_name == 'push' || github.event.inputs.run_arch_native == 'true' }}
needs: [setup, notes]
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
ref: ${{ needs.setup.outputs.tag }}
- name: Build .pkg.tar.zst inside Arch Container
run: |
PKGVER='${{ needs.setup.outputs.version }}'
TAG='${{ needs.setup.outputs.tag }}'
SRC_URL="https://github.com/dexoron/dcr/archive/refs/tags/${TAG}.tar.gz"
SHA256="$(curl -fsSL "$SRC_URL" | sha256sum | awk '{print $1}')"
mkdir -p arch-build
cat > arch-build/PKGBUILD <<PKG
pkgname=dcr
pkgver=${PKGVER}
pkgrel=1
pkgdesc="Cargo-like utility to manage C/C++ projects"
arch=('x86_64')
url="https://github.com/dexoron/dcr"
license=('GPL-3.0-or-later')
depends=('gcc-libs')
makedepends=('cargo')
options=('!lto')
source=("\$pkgname-\$pkgver.tar.gz::\$url/archive/refs/tags/v\$pkgver.tar.gz")
sha256sums=('${SHA256}')
build() {
cd "\$srcdir/\$pkgname-\$pkgver"
cargo build --release --locked
}
package() {
cd "\$srcdir/\$pkgname-\$pkgver"
install -Dm755 "target/release/dcr" "\$pkgdir/usr/bin/dcr"
install -Dm644 LICENSE "\$pkgdir/usr/share/licenses/\$pkgname/LICENSE"
}
PKG
docker run --rm \
-v ${{ github.workspace }}/arch-build:/build \
archlinux:latest \
bash -c "
pacman -Syu --noconfirm base-devel cargo gcc-libs git && \
useradd -m builduser && \
echo 'builduser ALL=(ALL) NOPASSWD: ALL' >> /etc/sudoers && \
chown -R builduser:builduser /build && \
cd /build && \
su builduser -c 'makepkg -s --noconfirm'
"
- name: Upload Arch Package Artifact
uses: actions/upload-artifact@v4
with:
name: arch-package
path: arch-build/*.pkg.tar.zst
- name: Upload Package to GitHub Release
uses: softprops/action-gh-release@v2
with:
tag_name: ${{ needs.setup.outputs.tag }}
files: arch-build/*.pkg.tar.zst
prerelease: ${{ needs.setup.outputs.prerelease == 'true' }}
# ── Arch User Repository (dcr) ─────────────────────────────────── # ── Arch User Repository (dcr) ───────────────────────────────────
publish-aur: publish-aur:
if: ${{ (github.event_name == 'push' && needs.setup.outputs.prerelease == 'false') || github.event.inputs.run_aur == 'true' }} if: ${{ (github.event_name == 'push' && needs.setup.outputs.prerelease == 'false') || github.event.inputs.run_aur == 'true' }}

View File

@@ -1,5 +1,52 @@
# Changelog # Changelog
## [0.6.9] - 2026-05-28
Added:
- **Dexoron Packages Index** — new standalone CI workflow (`.github/workflows/dexoron-packages-index.yml`)
that automatically updates the `dexoron/packages` repository indexes after a release.
Supports Arch Linux (`repo-add`), Debian (`dpkg-scanpackages`), and Fedora (`createrepo_c`).
Triggered by `workflow_dispatch` or `workflow_run` on the Release workflow.
- **Arch Linux native package** (`.pkg.tar.zst`) build inside the release workflow —
builds from source in an `archlinux:latest` Docker container using a dynamically
generated PKGBUILD.
- **AUR publish support** — new `run_aur` workflow dispatch input and `publish-aur` /
`publish-aur-bin` jobs that push PKGBUILD / `.SRCINFO` to `aur.archlinux.org`.
Changed:
- **Release workflow refactored** — Linux packages (deb, rpm, snap, arch) and BSD
builds now use `strategy.matrix` instead of separate jobs. A new
`publish-dexoron-packages` job collects all package artifacts and uploads them
to the GitHub Release in one step. Removed standalone `build-arch-package`,
`build-snap`, `build-deb-rpm` jobs. The old `run_arch_native` input is now
`run_linux_packages`.
- **Dexoron Packages Index workflow** extracted from `release.yml` into its own
file with support for Debian and RPM repository indexes in addition to Arch.
- **git2 vendoring** — enabled `vendored-libgit2` and `vendored-openssl` features
for reproducible CI builds without system libraries.
- **cargo-generate-rpm metadata** — updated to the current `package.metadata.rpm`
format (uses `files` table instead of `assets` array).
Fixed:
- **`--target=<triple>` no longer passed to GCC** — the flag is now only injected into
cflags when the resolved compiler name contains `"clang"`. GCC rejects this flag
with `unrecognized command-line option`.
- **Workspace clean test** — removed assertions for member-local `target/`
directories. Workspace members share the root `target/` directory, so their
individual `src/<name>/target/` is never created.
- **Release build test path** — corrected expected directory from `target/release`
to `target/x86_64-unknown-linux-gnu/release`.
## [0.6.8] - 2026-05-27 ## [0.6.8] - 2026-05-27
Added: Added:

View File

@@ -14,32 +14,23 @@ pkg-url = "{ repo }/releases/download/v{ version }/dcr-{ target }-{ version }{ b
[package.metadata.deb] [package.metadata.deb]
maintainer = "Dexoron (Bezotechestvo Vladimir) <main@dexoron.su>" maintainer = "Dexoron (Bezotechestvo Vladimir) <main@dexoron.su>"
copyright = "2026, Dexoron" copyright = "2026, Dexoron"
license-file = ["LICENSE"] extended-description = """
extended-description = """\ Cargo-like utility to manage C/C++ projects.
Cargo-like utility to manage C/C++ projects.\
""" """
section = "devel" section = "devel"
priority = "optional" priority = "optional"
assets = [ assets = [
["target/release/dcr", "usr/bin/dcr", "755"], ["target/release/dcr", "usr/bin/dcr", "755"],
# man-page:
# ["assets/dcr.1", "usr/share/man/man1/dcr.1", "644"],
] ]
[package.metadata.rpm] [package.metadata.rpm]
maintainer = "Dexoron (Bezotechestvo Vladimir) <main@dexoron.su>" summary = "Cargo-like utility to manage C/C++ projects"
copyright = "2026, Dexoron" description = """
license-file = ["LICENSE"] Cargo-like utility to manage C/C++ projects.
extended-description = """\
Cargo-like utility to manage C/C++ projects.\
""" """
section = "devel"
priority = "optional" [package.metadata.rpm.files]
assets = [ "/usr/bin/dcr" = { source = "target/release/dcr", mode = "755" }
["target/release/dcr", "usr/bin/dcr", "755"],
# man-page:
# ["assets/dcr.1", "usr/share/man/man1/dcr.1", "644"],
]
[dependencies] [dependencies]
glob = "0.3" glob = "0.3"
@@ -48,9 +39,9 @@ serde = { version = "1", features = ["derive"] }
self-replace = "1" self-replace = "1"
sha2 = "0.10" sha2 = "0.10"
toml = "1.0.3" toml = "1.0.3"
git2 = "0.20.4"
serde_json = "1" serde_json = "1"
ctrlc = "3" ctrlc = "3"
git2 = { version = "0.20.4", features = ["vendored-libgit2", "vendored-openssl"] }
[target.'cfg(not(windows))'.dependencies] [target.'cfg(not(windows))'.dependencies]
openssl = { version = "0.10", features = ["vendored"] } openssl = { version = "0.10", features = ["vendored"] }

View File

@@ -641,17 +641,6 @@ fn build_project_at(
.or_else(|| get_config_opt(&config, "toolchain.rcc")); .or_else(|| get_config_opt(&config, "toolchain.rcc"));
let mut build_cflags = let mut build_cflags =
get_list_with_profile_and_target(&config, "cflags", profile, build_target)?; get_list_with_profile_and_target(&config, "cflags", profile, build_target)?;
if let Some(t) = build_target
&& !t.trim().is_empty()
{
let target_flag = format!("--target={}", t.trim());
if !build_cflags
.iter()
.any(|f| f == &target_flag || f.starts_with("--target="))
{
build_cflags.insert(0, target_flag);
}
}
let mut build_ldflags = let mut build_ldflags =
get_list_with_profile_and_target(&config, "ldflags", profile, build_target)?; get_list_with_profile_and_target(&config, "ldflags", profile, build_target)?;
let build_ldscript = let build_ldscript =
@@ -688,6 +677,18 @@ fn build_project_at(
tc_cxx.as_deref(), tc_cxx.as_deref(),
tc_as.as_deref(), tc_as.as_deref(),
); );
if let Some(t) = build_target
&& !t.trim().is_empty()
&& resolved_compiler.to_lowercase().contains("clang")
{
let target_flag = format!("--target={}", t.trim());
if !build_cflags
.iter()
.any(|f| f == &target_flag || f.starts_with("--target="))
{
build_cflags.insert(0, target_flag);
}
}
let resolved_linker = resolve_tool("DCR_LD", tc_ld.as_deref()); let resolved_linker = resolve_tool("DCR_LD", tc_ld.as_deref());
let resolved_archiver = resolve_tool("DCR_AR", tc_ar.as_deref()); let resolved_archiver = resolve_tool("DCR_AR", tc_ar.as_deref());

View File

@@ -198,18 +198,6 @@ fn workspace_build_and_clean_all() {
"workspace clean --all --release should succeed" "workspace clean --all --release should succeed"
); );
for (name, _) in &members {
let member = root.join("src").join(name);
let target_dir = "target/x86_64-unknown-linux-gnu";
assert!(
!member.join(target_dir).join("release").exists(),
"member target/x86_64-unknown-linux-gnu/release should be removed"
);
assert!(
member.join(target_dir).join("debug").exists(),
"member target/x86_64-unknown-linux-gnu/debug should remain"
);
}
let target_dir = "target/x86_64-unknown-linux-gnu"; let target_dir = "target/x86_64-unknown-linux-gnu";
assert!( assert!(
!root.join(target_dir).join("release").exists(), !root.join(target_dir).join("release").exists(),

View File

@@ -280,8 +280,11 @@ fn build_release_profile() {
let out = run_dcr_env(&["build", "--release"], &dir, &envs); let out = run_dcr_env(&["build", "--release"], &dir, &envs);
assert!(out.status.success(), "release build should succeed"); assert!(out.status.success(), "release build should succeed");
assert!( assert!(
dir.join("target").join("release").is_dir(), dir.join("target")
"target/release should exist" .join("x86_64-unknown-linux-gnu")
.join("release")
.is_dir(),
"target/x86_64-unknown-linux-gnu/release should exist"
); );
} }