diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 9db5a9072..ac03d4456 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -9,7 +9,7 @@ on: pull_request: env: - SIGN_PIPE_VER: "v0.0.6" + SIGN_PIPE_VER: "v0.0.7" GORELEASER_VER: "v1.14.1" concurrency: diff --git a/release_files/darwin_pkg/postinstall b/release_files/darwin_pkg/postinstall new file mode 100755 index 000000000..ad5036130 --- /dev/null +++ b/release_files/darwin_pkg/postinstall @@ -0,0 +1,32 @@ +#!/bin/sh + +APP=/Applications/NetBird.app +AGENT=/usr/local/bin/netbird +LOG_FILE=/var/log/netbird/client_install.log + +{ + echo "Installing NetBird..." + + if test -d $APP; then + echo "NetBird app copied successfully." + else + echo "NetBird app could not be copied to the Applications folder." + exit 1 + fi + + ln -s $APP/Contents/MacOS/netbird $AGENT + if test -f $AGENT; then + echo "NetBird binary linked successfully." + else + echo "NetBird could not create symlink to /usr/local/bin" + exit 1 + fi + + $AGENT service install + $AGENT service start + + open $APP + + echo "Finished Netbird installation successfully" + exit 0 # all good +} &> $LOG_FILE diff --git a/release_files/darwin_pkg/preinstall b/release_files/darwin_pkg/preinstall new file mode 100755 index 000000000..dc630afd4 --- /dev/null +++ b/release_files/darwin_pkg/preinstall @@ -0,0 +1,8 @@ +#!/bin/sh + +LOG_FILE=/var/log/netbird/client_install.log + +{ + echo "Preinstall complete" + exit 0 # all good +} &> $LOG_FILE