Updated install script and README with new build setup
This commit is contained in:
11
README.md
11
README.md
@@ -29,7 +29,8 @@ Spoolman includes a web-client that lets you directly manipulate all the data. I
|
||||
_The web client is translated by the community using [Weblate](https://hosted.weblate.org/projects/spoolman/)._
|
||||
|
||||
## Integration status
|
||||
Spoolman is still relatively new, so support isn't widespread yet, but it's being actively integrated to multiple different projects.
|
||||
Spoolman doesn't depend on any specific printer software, but to make the most out of it, you should use it together with a frontend that supports it.
|
||||
It is currently only supported in the Klipper ecosystem, with official support for the major frontends. Support for other ecosystems like Octoprint is ongoing.
|
||||
|
||||
* ✔️ Moonraker - See the [Moonraker Documentation](https://moonraker.readthedocs.io/en/latest/configuration/#spoolman)
|
||||
* ✔️ Fluidd
|
||||
@@ -52,8 +53,8 @@ Copy-paste the entire below command and run it on your machine to install Spoolm
|
||||
sudo apt-get update && \
|
||||
sudo apt-get install -y curl jq && \
|
||||
mkdir -p ./Spoolman && \
|
||||
source_url=$(curl -s https://api.github.com/repos/Donkie/Spoolman/releases/latest | jq -r ".tarball_url") && \
|
||||
curl -sSL $source_url | tar -xz --strip-components=1 -C ./Spoolman && \
|
||||
source_url=$(curl -s https://api.github.com/repos/Donkie/Spoolman/releases/latest | jq -r '.assets[] | select(.name == "spoolman.zip").browser_download_url') && \
|
||||
curl -sSL $source_url -o temp.zip && unzip temp.zip -d ./Spoolman && rm temp.zip && \
|
||||
cd ./Spoolman && \
|
||||
bash ./scripts/install_debian.sh
|
||||
```
|
||||
@@ -72,8 +73,8 @@ systemctl --user disable Spoolman
|
||||
# Download and install the new version
|
||||
mv Spoolman Spoolman_old && \
|
||||
mkdir -p ./Spoolman && \
|
||||
source_url=$(curl -s https://api.github.com/repos/Donkie/Spoolman/releases/latest | jq -r ".tarball_url") && \
|
||||
curl -sSL $source_url | tar -xz --strip-components=1 -C ./Spoolman && \
|
||||
source_url=$(curl -s https://api.github.com/repos/Donkie/Spoolman/releases/latest | jq -r '.assets[] | select(.name == "spoolman.zip").browser_download_url') && \
|
||||
curl -sSL $source_url -o temp.zip && unzip temp.zip -d ./Spoolman && rm temp.zip && \
|
||||
cp Spoolman_old/.env Spoolman/.env && \
|
||||
cd ./Spoolman && \
|
||||
bash ./scripts/install_debian.sh && \
|
||||
|
||||
@@ -148,37 +148,6 @@ echo -e "${GREEN}Installing Spoolman backend and its dependencies using PDM...${
|
||||
pdm config venv.backend venv || exit 1
|
||||
pdm sync --prod --no-editable || exit 1
|
||||
|
||||
# Get version number from pyproject.toml
|
||||
spoolman_version=$(grep "^version = " pyproject.toml | awk '{print $3}' | sed 's/"//g')
|
||||
|
||||
# Check if a client has already been downloaded for this version
|
||||
download_client=1
|
||||
if [ -f "client/dist/version.txt" ]; then
|
||||
client_version=$(cat client/dist/version.txt)
|
||||
if [ "$client_version" != "$spoolman_version" ]; then
|
||||
# Client version is different, delete the client folder
|
||||
echo -e "${ORANGE}Spoolman web client version (v$client_version) is different from server version (v$spoolman_version). Deleting old client...${NC}"
|
||||
rm -rf client/dist
|
||||
else
|
||||
# Client version is the same, no need to download it again
|
||||
echo -e "${GREEN}Spoolman web client is up to date (v$client_version)${NC}"
|
||||
download_client=0
|
||||
fi
|
||||
fi
|
||||
|
||||
# Download appropriate client for this version
|
||||
if [ "$download_client" -eq 1 ]; then
|
||||
url="https://github.com/Donkie/Spoolman/releases/download/v$spoolman_version/spoolman-client.zip"
|
||||
echo -e "${GREEN}Downloading Spoolman web client v$spoolman_version...${NC}"
|
||||
# Download and unzip silently
|
||||
curl -sL "$url" -o spoolman-client.zip || exit 1
|
||||
unzip -q -o spoolman-client.zip -d client/dist/ || exit 1
|
||||
rm spoolman-client.zip
|
||||
|
||||
# Write a file to the client/dist/ folder to indicate which version of the client this is
|
||||
echo "$spoolman_version" > client/dist/version.txt
|
||||
fi
|
||||
|
||||
#
|
||||
# Initialize the .env file if it doesn't exist
|
||||
#
|
||||
|
||||
Reference in New Issue
Block a user