certainly 1.0.0

The easiest way to create self-signed certificates. Ever.
#!/usr/bin/env bash

tag=$1
target=$2

if [[ -z "$tag" ]]; then
    echo Tag is needed
    exit 1
fi

if [[ -z "$target" ]]; then
    echo Target is needed
    exit 1
fi


cargo build --target $target --release

build_dir=$(mktemp -d 2>/dev/null || mktemp -d -t tmp)
out_dir=$(pwd)
name="certainly-$tag-$target"
mkdir "$build_dir/$name"

cp target/$target/release/certainly "$build_dir/$name/"
cp LICENSE "$build_dir/$name/"

pushd $build_dir
strip "$name/certainly"
tar cvf "$out_dir/$name.tar" "$name"
popd
xz -f9 "$name.tar"