diff --git a/Makefile b/Makefile index 7ffe1f9c..8adf760f 100644 --- a/Makefile +++ b/Makefile @@ -2,7 +2,7 @@ version = $(shell ./scripts/version-at-commit.sh) build: - go build -ldflags "-s -w -X main.version=$(version)" cmd/headscale/headscale.go + go build -ldflags "-s -w -X github.com/juanfont/headscale/cmd/headscale/cli.version=$(version)" cmd/headscale/headscale.go dev: lint test build diff --git a/scripts/version-at-commit.sh b/scripts/version-at-commit.sh index aebdb870..2f7fab84 100755 --- a/scripts/version-at-commit.sh +++ b/scripts/version-at-commit.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash set -e -o pipefail commit="$1"