diff --git a/.dockerignore b/.dockerignore index 27899c6ba..5f2af4dac 100644 --- a/.dockerignore +++ b/.dockerignore @@ -3,7 +3,6 @@ venv/ .DS_Store .gitignore .git -.github .idea .buildHelper.txt node_modules diff --git a/.github/latest b/.github/latest deleted file mode 100644 index fbcbf7380..000000000 --- a/.github/latest +++ /dev/null @@ -1 +0,0 @@ -3.4.0 \ No newline at end of file diff --git a/.github/workflows/beta-ci.yml b/.github/workflows/beta-ci.yml index 6480cb18f..1e8906cdd 100644 --- a/.github/workflows/beta-ci.yml +++ b/.github/workflows/beta-ci.yml @@ -22,9 +22,9 @@ jobs: uses: actions/checkout@v2 # Get the Release Version from .github/latest - - name: Get the Release Version from .github/latest + - name: Get the Release Version from latest id: get_version - run: echo "::set-output name=version::$(cat .github/latest)" + run: echo "::set-output name=version::$(cat latest)" # Set up Docker Buildx - name: Set up Docker Buildx diff --git a/.github/workflows/beta-release.yml b/.github/workflows/beta-release.yml index 96901dca2..b882cbf2d 100644 --- a/.github/workflows/beta-release.yml +++ b/.github/workflows/beta-release.yml @@ -13,15 +13,15 @@ jobs: - name: Checkout code uses: actions/checkout@v2 - # Get the previous package version from .github/latest - - name: Get previous package version from .github/latest + # Get the previous package version from latest + - name: Get previous package version from latest id: get_prev_version - run: echo "::set-output name=prev_version::$(cat .github/latest)" + run: echo "::set-output name=prev_version::$(cat latest)" - # Get the current package version from .github/latest + # Get the current package version from latest - name: Get current package version id: get_current_version - run: echo "::set-output name=current_version::$(cat .github/latest)" + run: echo "::set-output name=current_version::$(cat latest)" # Compare the previous and current versions - name: Compare versions diff --git a/Dockerfile b/Dockerfile index c06be2ee1..fc4bc4db6 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,6 +1,10 @@ # Build Stage FROM --platform=$BUILDPLATFORM python:3.12.0-alpine +# Copy over version +WORKDIR /data +COPY latest latest + ####################### # Backend Build Stage # ####################### @@ -48,13 +52,9 @@ RUN cp /usr/share/zoneinfo/UTC /etc/localtime \ # Set environment variables ENV TZ=Etc/UTC -# Get the version from package.json in the ./ directory -COPY ./package.json ./version.json - LABEL maintainer="Ashley Bailey " LABEL description="Wizarr is an advanced user invitation and management system for Jellyfin, Plex, Emby etc." - # Expose ports EXPOSE 5690 WORKDIR /data/backend diff --git a/backend/app/utils/software_lifecycle.py b/backend/app/utils/software_lifecycle.py index 01dde8570..099a4aa83 100644 --- a/backend/app/utils/software_lifecycle.py +++ b/backend/app/utils/software_lifecycle.py @@ -23,9 +23,9 @@ def get_latest_beta_version(): return None def get_current_version(): - package = path.abspath(path.join(path.dirname(__file__), "../", "../", "../", "package.json")) + package = path.abspath(path.join(path.dirname(__file__), "../", "../", "../", "latest")) with open(package, "r", encoding="utf-8") as f: - return parse(load(f)["version"]) + return parse(f.read()) def is_beta(): diff --git a/latest b/latest new file mode 100644 index 000000000..8cf6caf56 --- /dev/null +++ b/latest @@ -0,0 +1 @@ +3.4.1 \ No newline at end of file diff --git a/package.json b/package.json deleted file mode 100644 index 065ae4ccb..000000000 --- a/package.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "version": "3.4.0" -} \ No newline at end of file