2
0
mirror of https://github.com/inventree/InvenTree.git synced 2025-06-14 19:15:41 +00:00

Installer fixes (#3962)

* Switch variable to make it easier to debug
Fixes #3933

* rename output file

* add setting to directly generate refs

* use prod mode

* fix check

* add debug flags

* remove debug marker

* pre-safe keys

* update installer ref

* split installer steps

* split steps further

* try static adding

* remove split key add

* try dry rn again

* do not dry run keys

* fix debian 11 detection

* add ci to let install run through

* remove flags

* remove dryrun

* run on master

* query api on test

* fix missing env

* use matmair for tests

* use specific version

* remove old python first

* check python version

* add more version checks

* multiline marker for action

* add option to select python env

* set python version before running installer

* cleanup script

* use inline apt for python install

* package 3.9 by default

* remove custom python install

* add some sleeps

* fix package names

* reduce double depb definition

* set python version

* remove 3.9 requirement

* do invoke and wheel install in the right context

* fix typing for 3.8

* use var for config file if it exsists

* fix discovery

* use raw output for jq

* remove tests

* revert change in tasks.py
This commit is contained in:
Matthias Mair
2022-11-20 09:29:12 +01:00
committed by GitHub
parent 798e95910c
commit a2abdc297b
8 changed files with 101 additions and 450 deletions

View File

@ -1,4 +1,4 @@
name: install
name: install.sh
help: Interactive installer for InvenTree
version: 2.0

View File

@ -45,25 +45,26 @@ echo "### Installer for InvenTree - source: $publisher/$source_url"
# Check if os and version is supported
get_distribution
echo "### Detected distribution: $OS $VER"
NOT_SUPPORTED=false
SUPPORTED=true
case "$OS" in
Ubuntu)
if [[ $VER != "20.04" ]]; then
NOT_SUPPORTED=true
SUPPORTED=false
fi
;;
Debian | Raspbian)
"Debian GNU/Linux" | Raspbian)
if [[ $VER != "11" ]]; then
NOT_SUPPORTED=true
SUPPORTED=false
fi
OS=Debian
;;
*)
echo "### Distribution not supported"
NOT_SUPPORTED=true
SUPPORTED=false
;;
esac
if [[ $NOT_SUPPORTED ]]; then
if [[ $SUPPORTED != "true" ]]; then
echo "This OS is currently not supported"
echo "please install manually using https://inventree.readthedocs.io/en/stable/start/install/"
echo "or check https://github.com/inventree/InvenTree/issues/3836 for packaging for your OS."
@ -82,11 +83,10 @@ for pkg in $REQS; do
fi
done
echo "### Adding key and package source"
# Add key
do_call "wget -qO- https://dl.packager.io/srv/$publisher/InvenTree/key | sudo apt-key add -"
# Add packagelist
do_call "sudo wget -O /etc/apt/sources.list.d/inventree.list https://dl.packager.io/srv/$publisher/InvenTree/$source_url/installer/${lsb_dist}/${dist_version}.repo"
echo "### Getting and adding key"
wget -qO- https://dl.packager.io/srv/$publisher/InvenTree/key | sudo apt-key add -
echo "### Adding package source"
do_call "sudo wget -O /etc/apt/sources.list.d/inventree.list https://dl.packager.io/srv/$publisher/InvenTree/$source_url/installer/${OS,,}/${VER}.repo"
echo "### Updateing package lists"
do_call "sudo apt-get update"