Skip to content

Commit

Permalink
Merge branch 'dev' into '78-release-v1-0-4'
Browse files Browse the repository at this point in the history
Dev

See merge request cploutarchou/MicroGO!53
  • Loading branch information
cploutarchou committed Aug 13, 2022
2 parents 739212a + 8d32539 commit af1d5c2
Show file tree
Hide file tree
Showing 3 changed files with 35 additions and 14 deletions.
4 changes: 3 additions & 1 deletion CHANGELOG
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@

v1.0.4
### Version 1.0.4
- Create install script for MacOS
43 changes: 31 additions & 12 deletions install.sh
Original file line number Diff line number Diff line change
@@ -1,14 +1,33 @@
#!/bin/bash

echo "Installing MicroGO binaries..."
wget https://github.com/cploutarchou/MicroGO/releases/download/v1.0.1/microGo
userDir=$USER
echo "Enter your password to install MicroGO binaries using sudo"
sudo chmod +x microGo
sudo mv microGo /usr/local/bin/microGo # move to /usr/local/bin/microGo
echo "MicroGO binaries installed"
echo "Export env"
# shellcheck disable=SC2016
echo 'export PATH=$PATH:/usr/local/bin/microGo' >>/home/"$userDir"/.bashrc
echo "MicroGO binaries exported to PATH"
source /home/"$userDir"/.bashrc
echo "Installing MicroGO binaries..."
curl -LJO https://github.com/cploutarchou/MicroGO/releases/download/v1.0.3/microGo
if [[ "$OSTYPE" == "linux-gnu"* ]]; then
if grep -q "alias microGo" ~/.zprofile; then
echo "Already exported"
else
sudo mv microGo /usr/local/bin/microGo
chmod +x /usr/local/bin/microGo
echo 'export PATH=$PATH:/usr/local/bin/microGo' >>/home/"$userDir"/.bashrc
echo "MicroGO binaries exported to PATH"
source /home/"$userDir"/.bashrc
fi
elif [[ "$OSTYPE" == "darwin"* ]]; then
mv microGo /Users/$userDir/go/bin/microGo
echo "Enter your password to install MicroGO binaries using sudo"
chmod +x /Users/$userDir/go/bin/microGo # move to /usr/local/bin/microGo
echo "MicroGO binaries installed"
echo "Export env"
if grep -q "alias microGo" ~/.zprofile; then
echo "Already exported"
else
source ~/.zprofile
comm="alias microGo=/Users/$userDir/go/bin/microGo"
echo $comm >>/Users/"$userDir"/.zprofile # add to .zprofile
echo "MicroGO binaries exported to PATH"
source ~/.zprofile
fi
else

echo "Unsupported OS"
fi
2 changes: 1 addition & 1 deletion microGo.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ import (
"github.com/robfig/cron/v3"
)

const version = "1.0.3"
const version = "1.0.4"

var (
redisCache *cache.RedisCache
Expand Down

0 comments on commit af1d5c2

Please sign in to comment.