Skip to content

Commit

Permalink
Merge branch 'master' into patch-1
Browse files Browse the repository at this point in the history
  • Loading branch information
mattkasun authored Oct 13, 2023
2 parents 61d8b45 + f58f117 commit 5eea4ec
Show file tree
Hide file tree
Showing 5 changed files with 22 additions and 17 deletions.
3 changes: 2 additions & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,9 +49,10 @@ jobs:
cp ../service/com.gravitl.netclient.plist .
cp ../Casks/scripts/install.sh .
cp ../Casks/scripts/uninstall.sh .
cp ../Casks/scripts/blank.sh .
sed -i 's/VERSION/"${{ env.PACKAGE_VERSION }}"/'' install.sh
tar -zcf netclient.tgz netclient com.gravitl.netclient.plist
rm netclient com.gravitl.netclient.plist install.sh uninstall.sh
rm netclient com.gravitl.netclient.plist install.sh uninstall.sh blank.sh
- name: update
run: |
SHA=$(shasum -a 256 build/netclient.tgz | cut -d " " -f 1)
Expand Down
15 changes: 8 additions & 7 deletions Casks/netclient.rb
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
cask "netclient" do
arch = Hardware::CPU.intel? ? "amd64" : "arm64"
version "0.17.0"
version "0.21.0"

if Hardware::CPU.intel?
sha256 "20af8ace3317630d3bec788614631e58e543ace95afb59dfc413aca9f1314d7b"
sha256 "b2e0fce02e6291e1f941b209f55db95c9c56eaefcd04663b3b784ad8c448b44d"
else
sha256 "c5ab83a37b2f630a975c4764a2090b986779f73f82234ef3ca2bd64ca4c47491"
sha256 "d958dd9561985be84835a70cc8734d283fd4115a89b0e3db6169e5fc3972babe"
end

url "https://fileserver.netmaker.org/v#{version}/darwin/netclient-#{arch}.tgz",
url "https://fileserver.netmaker.org/releases/download/v#{version}/netclient-#{arch}.tgz",
verified: "https://fileserver.netmaker.org"
name "netclient"
desc "A platform for modern, blazing fast virtual networks"
Expand All @@ -25,14 +25,15 @@
sudo: true,
}

zap script: {
executable: "#{staged_path}/uninstall.sh",
uninstall script: {
executable: "#{staged_path}/blank.sh",
sudo: true,
}

uninstall script: {
zap script: {
executable: "#{staged_path}/uninstall.sh",
sudo: true,
}

end

2 changes: 2 additions & 0 deletions Casks/scripts/blank.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
#!/bin/sh
pwd
4 changes: 2 additions & 2 deletions Casks/scripts/uninstall.sh
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
#!/bin/sh

export PATH=/usr/local/bin:/usr/homebrew/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Library/Apple/usr/bin
export PATH=/usr/local/bin:/opt/homebrew/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Library/Apple/usr/bin
if [ -f /usr/local/bin/netclient ]; then
netclient uninstall
fi
if [ -f /usr/homebrew/bin/netclient ]; then
if [ -f /opt/homebrew/bin/netclient ]; then
netclient uninstall
fi
if [ -f /var/log/com/gravitl.netclient.log ]; then
Expand Down
15 changes: 8 additions & 7 deletions build/build_tarfiles.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,19 +7,20 @@
#cp arch independent files
cp ../Casks/scripts/install.sh .
cp ../Casks/scripts/uninstall.sh .
cp ../Casks/scripts/blank.sh .
sed -i s/"VERSION/$VERSION"/ install.sh

#get amd64 binary
wget -O netclient "https://github.com/gravitl/netmaker/releases/download/v$VERSION/netclient-darwin"
wget -O netclient "https://github.com/gravitl/netclient/releases/download/v$VERSION/netclient-darwin-amd64"
chmod +x netclient
cp ../service/com.gravitl.netclient.plist .
tar -zcf netclient-amd64.tgz netclient com.gravitl.netclient.plist install.sh uninstall.sh
tar -zcf netclient-amd64.tgz netclient com.gravitl.netclient.plist install.sh uninstall.sh blank.sh

#get arm64 binary
wget -O netclient "https://github.com/gravitl/netmaker/releases/download/v$VERSION/netclient-darwin-arm64"
wget -O netclient "https://github.com/gravitl/netclient/releases/download/v$VERSION/netclient-darwin-arm64"
chmod +x netclient
cp ../service/com.gravitl.netclient.plist.m1 com.gravitl.netclient.plist
tar -zcf netclient-arm64.tgz netclient com.gravitl.netclient.plist install.sh uninstall.sh
tar -zcf netclient-arm64.tgz netclient com.gravitl.netclient.plist install.sh uninstall.sh blank.sh

#calc sha
SHA1=$(shasum -a 256 netclient-amd64.tgz | cut -d " " -f 1)
Expand All @@ -31,6 +32,6 @@ sed -i "6s/.*/\ sha256 \"$SHA1\"/" ../Casks/netclient.rb
sed -i "8s/.*/\ sha256 \"$SHA2\"/" ../Casks/netclient.rb

#copy files to netmaker.org
mkdir -p /var/www/files/v$VERSION/darwin/
cp netclient-amd64.tgz /var/www/files/v$VERSION/darwin/
cp netclient-arm64.tgz /var/www/files/v$VERSION/darwin/
mkdir -p /var/www/files/releases/download/v$VERSION
cp netclient-amd64.tgz /var/www/files/releases/download/v$VERSION/
cp netclient-arm64.tgz /var/www/files/releases/download/v$VERSION/

0 comments on commit 5eea4ec

Please sign in to comment.