Skip to content

Commit

Permalink
chore: rename var VERSION to PROJECT_VERSION
Browse files Browse the repository at this point in the history
  • Loading branch information
tristiisch committed Aug 27, 2024
1 parent aff54eb commit 3428c16
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion .env.exemple
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,4 @@ SPOTIFY__CLIENT_SECRET=
GENERAL__LIMIT_TRACKS=100

MODE=production
VERSION=0.2
PROJECT_VERSION=0.2
4 changes: 2 additions & 2 deletions .github/workflows/python.yml
Original file line number Diff line number Diff line change
Expand Up @@ -204,7 +204,7 @@ jobs:
cache-to: type=gha,mode=max
provenance: mode=max
build-args: |
VERSION=${{ needs.info.outputs.project_version }}
PROJECT_VERSION=${{ needs.info.outputs.project_version }}
outputs: type=image,name=${{ env.REGISTRY_IMAGE }},push-by-digest=true,name-canonical=true,push=true

- name: Export digest
Expand Down Expand Up @@ -378,7 +378,7 @@ jobs:
cache-from: type=gha
cache-to: type=gha,mode=max
build-args: |
VERSION=${{ needs.info.outputs.project_version }}-tests
PROJECT_VERSION=${{ needs.info.outputs.project_version }}-tests
push: false
outputs: type=docker

Expand Down
6 changes: 3 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Define the Python version and other build arguments
ARG PYTHON_VERSION=3.12
ARG VERSION=0.0.0
ARG PROJECT_VERSION=0.0.0
ARG APP_USER=app-usr
ARG APP_GROUP=app-grp

Expand Down Expand Up @@ -61,13 +61,13 @@ RUN mkdir -p ./songs && chmod 770 ./songs && chown root:$APP_GROUP ./songs && \
# ============================ Executable Image ============================
FROM base AS executable

ARG VERSION
ARG PROJECT_VERSION
ARG APP_USER
ARG APP_GROUP

LABEL org.opencontainers.image.source="https://github.com/tristiisch/PyRamid" \
org.opencontainers.image.authors="tristiisch" \
version="$VERSION"
version="$PROJECT_VERSION"

# Copy the virtual environment from the builder stage
COPY --chown=root:$APP_GROUP --chmod=550 --from=builder /opt/venv /opt/venv
Expand Down
2 changes: 1 addition & 1 deletion src/pyramid/data/functional/application_info.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ class ApplicationInfo:
def __init__(self):
self.__name = "pyramid"
self.__os = self.__detect_os().lower()
self.__version = os.getenv("VERSION")
self.__version = os.getenv("PROJECT_VERSION")

def get_version(self):
return f"v{self.__version}"
Expand Down

0 comments on commit 3428c16

Please sign in to comment.