diff --git a/build.zig.version b/build.zig.version deleted file mode 100644 index e815b86..0000000 --- a/build.zig.version +++ /dev/null @@ -1 +0,0 @@ -0.15.1 diff --git a/build.zig.zon b/build.zig.zon index 1c7b692..890faf7 100644 --- a/build.zig.zon +++ b/build.zig.zon @@ -1,12 +1,13 @@ .{ .name = .thespian, .version = "0.0.1", + .minimum_zig_version = "0.15.2", .fingerprint = 0xe9ff00fd8e4e01a3, .dependencies = .{ .cbor = .{ - .url = "git+https://github.com/neurocyte/cbor?ref=master#7d2eeb68c8a2fb3f4d6baad6cc04c521b92974c0", - .hash = "cbor-1.0.0-RcQE_AswAQAPlqBCZXYQf9DZXn-0Ubt8Mk03ZcJWcsAG", + .url = "git+https://github.com/neurocyte/cbor?ref=master#b6fc137250b7d3f70459652ee78c7b6cd9ad2826", + .hash = "cbor-1.0.0-RcQE_HwwAQAiNkKC9ezLxHUMkWgHeVa3QyTfv4hi3VZR", }, .asio = .{ .url = "git+https://github.com/neurocyte/asio#0f1cbf24e5fb6fabe7078a20b76452f42e24a0df", diff --git a/cdb b/cdb new file mode 100755 index 0000000..8cceff5 --- /dev/null +++ b/cdb @@ -0,0 +1,15 @@ +#!/bin/bash +set -e + +rm -rf .zig-cache +rm -rf .cache/cdb +mkdir -p .cache/cdb + +zig build + +( + echo \[ + cat .cache/cdb/* + echo {}\] +) | perl -0777 -pe 's/,\n\{\}//igs' | jq . | grep -v 'no-default-config' >compile_commands.json +exit 0 diff --git a/zig b/zig deleted file mode 100755 index 0e45eb0..0000000 --- a/zig +++ /dev/null @@ -1,73 +0,0 @@ -#!/bin/bash -set -e - -ARCH=$(uname -m) - -BASEDIR="$(cd "$(dirname "$0")" && pwd)" -ZIGDIR=$BASEDIR/.cache/zig -VERSION=$(build.zig.version - NEWVERSION=$(&/dev/null; then - TARBALL="https://ziglang.org/builds/$ZIGVER.tar.xz" - fi - if [ ! -d "$ZIGVER" ]; then - curl "$TARBALL" | tar -xJ - fi - ) -} -get_zig - -if [ "$1" == "cdb" ]; then - rm -rf .zig-cache - rm -rf .cache/cdb - - $ZIG build - - ( - echo \[ - cat .cache/cdb/* - echo {}\] - ) | perl -0777 -pe 's/,\n\{\}//igs' | jq . | grep -v 'no-default-config' >compile_commands.json - exit 0 -fi - -exec $ZIG "$@"