dub.sdlsdl · 46 linesall
name "release"
description "Cut a sparkles release: scan tags, summarize commits, suggest a bump, write notes, tag and publish"
authors "Petar Kirov"
copyright "Copyright © 2026, Petar Kirov"
license "BSL-1.0"

targetType "executable"
targetName "release"
targetPath "build"

mainSourceFile "src/app.d"

dflags "-preview=in" "-preview=dip1000"

dependency "expected" version="~>0.4.1"
dependency "sparkles:base" path="../.."
dependency "sparkles:core-cli" path="../.."
dependency "sparkles:versions" path="../.."
dependency "sparkles:wired" path="../.."

configuration "application" {
    targetType "executable"
}

configuration "unittest" {
    targetType "library"
    excludedSourceFiles "src/app.d"

    dependency "sparkles:test-runner" path="../.."

    // The test build compiles wired's sources with -unittest (this tool
    // serializes through sparkles:wired), and wired's `sdl/files.d` has a
    // `version (unittest)` import of the temporary-filesystem helpers. wired
    // keeps its own test-utils edge unittest-scoped (a main-recipe edge races
    // concurrent single-file example builds in the shared dub workspace), so
    // this build declares the import path itself.
    dependency "sparkles:test-utils" path="../.."

    dflags "-checkaction=context" "-allinst"
}
// Optimised, assertions live, `debug {}` blocks out — the build every nix
// artifact uses. Neither `debug` (which compiles those blocks in) nor
// `release` (which deletes assert *expressions*, side effects included).
buildType "checked" {
    buildOptions "optimize" "inline" "debugInfo"
}