aboutsummaryrefslogtreecommitdiff
path: root/build.zig
diff options
context:
space:
mode:
Diffstat (limited to 'build.zig')
-rw-r--r--build.zig6
1 files changed, 2 insertions, 4 deletions
diff --git a/build.zig b/build.zig
index f93974d..d1d4c0c 100644
--- a/build.zig
+++ b/build.zig
@@ -2,12 +2,14 @@ const std = @import("std");
pub fn build(b: *std.Build) void {
const path_prefix = b.option([]const u8, "path-prefix", "The prefix which is set for porteur's data directories.") orelse b.getInstallPath(.prefix, ".");
+ const version = b.option([]const u8, "version", "The version used for porteur.") orelse "dev";
const target = b.standardTargetOptions(.{});
const optimize = b.standardOptimizeOption(.{});
const options = b.addOptions();
options.addOption([]const u8, "path_prefix", path_prefix);
+ options.addOption([]const u8, "version", version);
const exe = b.addExecutable(.{
.name = "porteur",
@@ -38,8 +40,4 @@ pub fn build(b: *std.Build) void {
const run_test = b.addRunArtifact(tests);
const test_step = b.step("test", "Run unit tests");
test_step.dependOn(&run_test.step);
-
- const clean_step = b.step("clean", "Clean up");
- clean_step.dependOn(&b.addRemoveDirTree(.{ .cwd_relative = b.install_path }).step);
- clean_step.dependOn(&b.addRemoveDirTree(.{ .cwd_relative = b.pathFromRoot("zig-cache") }).step);
}