mirror of
https://github.com/ArchiveBox/ArchiveBox
synced 2024-11-26 06:00:22 +00:00
skip brew build in linux and debian build on mac
This commit is contained in:
parent
e90cf05141
commit
db1f9b759e
3 changed files with 18 additions and 3 deletions
13
bin/build_brew.sh
Normal file → Executable file
13
bin/build_brew.sh
Normal file → Executable file
|
@ -12,11 +12,18 @@ IFS=$'\n'
|
||||||
|
|
||||||
REPO_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && cd .. && pwd )"
|
REPO_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && cd .. && pwd )"
|
||||||
|
|
||||||
|
|
||||||
|
CURRENT_PLAFORM="$(uname)"
|
||||||
|
REQUIRED_PLATFORM="Darwin"
|
||||||
|
if [[ "$CURRENT_PLAFORM" != "$REQUIRED_PLATFORM" ]]; then
|
||||||
|
echo "[!] Skipping the Homebrew package build on $CURRENT_PLAFORM (it can only be run on $REQUIRED_PLATFORM)."
|
||||||
|
exit 0
|
||||||
|
fi
|
||||||
|
|
||||||
|
|
||||||
cd "$REPO_DIR/brew_dist"
|
cd "$REPO_DIR/brew_dist"
|
||||||
|
|
||||||
|
|
||||||
# make sure archivebox.rb is up-to-date with the dependencies
|
# make sure archivebox.rb is up-to-date with the dependencies
|
||||||
|
|
||||||
echo "[+] Building bottle"
|
echo "[+] Building Homebrew bottle"
|
||||||
brew install --build-bottle ./archivebox.rb
|
brew install --build-bottle ./archivebox.rb
|
||||||
brew bottle archivebox
|
brew bottle archivebox
|
||||||
|
|
|
@ -19,6 +19,13 @@ else
|
||||||
fi
|
fi
|
||||||
cd "$REPO_DIR"
|
cd "$REPO_DIR"
|
||||||
|
|
||||||
|
CURRENT_PLAFORM="$(uname)"
|
||||||
|
REQUIRED_PLATFORM="Linux"
|
||||||
|
if [[ "$CURRENT_PLAFORM" != "$REQUIRED_PLATFORM" ]]; then
|
||||||
|
echo "[!] Skipping the Debian package build on $CURRENT_PLAFORM (it can only be run on $REQUIRED_PLATFORM)."
|
||||||
|
exit 0
|
||||||
|
fi
|
||||||
|
|
||||||
VERSION="$(jq -r '.version' < "$REPO_DIR/package.json")"
|
VERSION="$(jq -r '.version' < "$REPO_DIR/package.json")"
|
||||||
DEBIAN_VERSION="1"
|
DEBIAN_VERSION="1"
|
||||||
PGP_KEY_ID="7D5695D3B618872647861D51C38137A7C1675988"
|
PGP_KEY_ID="7D5695D3B618872647861D51C38137A7C1675988"
|
||||||
|
|
|
@ -14,6 +14,7 @@ REPO_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && cd .. && p
|
||||||
VERSION="$(jq -r '.version' < "$REPO_DIR/package.json")"
|
VERSION="$(jq -r '.version' < "$REPO_DIR/package.json")"
|
||||||
cd "$REPO_DIR"
|
cd "$REPO_DIR"
|
||||||
|
|
||||||
|
which docker > /dev/null
|
||||||
|
|
||||||
echo "[+] Building docker image in the background..."
|
echo "[+] Building docker image in the background..."
|
||||||
docker build . -t archivebox \
|
docker build . -t archivebox \
|
||||||
|
|
Loading…
Reference in a new issue