Skip to content

Commit

Permalink
ci: Fix GitLab CI/CD pipeline. (#172)
Browse files Browse the repository at this point in the history
  • Loading branch information
huxuan committed Sep 15, 2023
1 parent c56e18f commit e62ad48
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
6 changes: 3 additions & 3 deletions Makefile
Expand Up @@ -8,7 +8,7 @@
PIPRUN := $(shell [ "$$CI" != "true" ] && command -v pipenv > /dev/null 2>&1 && echo "pipenv run")

# Get the Python version in `major.minor` format, using the environment variable or the virtual environment if exists.
PYTHON_VERSION := $(shell echo $${PYTHON_VERSION:-$$(python -V 2>&1 | cut -d ' ' -f 2 | cut -d '.' -f 1,2)})
PYTHON_VERSION := $(shell echo $${PYTHON_VERSION:-$$(python -V 2>&1 | cut -d ' ' -f 2)} | cut -d '.' -f 1,2)

# Determine the constraints file based on the Python version.
CONSTRAINTS_FILE := constraints/$(PYTHON_VERSION).txt
Expand All @@ -17,7 +17,7 @@ CONSTRAINTS_FILE := constraints/$(PYTHON_VERSION).txt
PUBLIC_DIR := $(shell [ "$$READTHEDOCS" = "True" ] && echo "$$READTHEDOCS_OUTPUT/html" || echo "public")

# URL and Path of changelog source code.
CHANGELOG_URL := https://serious-scaffold.github.io/serious-scaffold-python/_sources/changelog.md.txt
CHANGELOG_URL := $(shell echo $${CI_PAGES_URL:-https://serious-scaffold.github.io/serious-scaffold-python}/_sources/changelog.md.txt)
CHANGELOG_PATH := docs/changelog.md

########################################################################################
Expand Down Expand Up @@ -144,7 +144,7 @@ changelog:

# Generate release notes from changelog.
release-notes:
$(PIPRUN) git-changelog --input $(CHANGELOG_PATH) --release-notes
@$(PIPRUN) git-changelog --input $(CHANGELOG_PATH) --release-notes

# Build documentation only from src.
docs-gen:
Expand Down
6 changes: 3 additions & 3 deletions template/Makefile.jinja
Expand Up @@ -9,7 +9,7 @@
PIPRUN := $(shell [ "$$CI" != "true" ] && command -v pipenv > /dev/null 2>&1 && echo "pipenv run")

# Get the Python version in `major.minor` format, using the environment variable or the virtual environment if exists.
PYTHON_VERSION := $(shell echo $${PYTHON_VERSION:-$$(python -V 2>&1 | cut -d ' ' -f 2 | cut -d '.' -f 1,2)})
PYTHON_VERSION := $(shell echo $${PYTHON_VERSION:-$$(python -V 2>&1 | cut -d ' ' -f 2)} | cut -d '.' -f 1,2)

# Determine the constraints file based on the Python version.
CONSTRAINTS_FILE := constraints/$(PYTHON_VERSION).txt
Expand All @@ -18,7 +18,7 @@ CONSTRAINTS_FILE := constraints/$(PYTHON_VERSION).txt
PUBLIC_DIR := $(shell [ "$$READTHEDOCS" = "True" ] && echo "$$READTHEDOCS_OUTPUT/html" || echo "public")

# URL and Path of changelog source code.
CHANGELOG_URL := https://{{ page_url() }}/_sources/changelog.md.txt
CHANGELOG_URL := $(shell echo $${CI_PAGES_URL:-https://serious-scaffold.github.io/serious-scaffold-python}/_sources/changelog.md.txt)
CHANGELOG_PATH := docs/changelog.md

########################################################################################
Expand Down Expand Up @@ -147,7 +147,7 @@ changelog:

# Generate release notes from changelog.
release-notes:
$(PIPRUN) git-changelog --input $(CHANGELOG_PATH) --release-notes
@$(PIPRUN) git-changelog --input $(CHANGELOG_PATH) --release-notes

# Build documentation only from src.
docs-gen:
Expand Down

0 comments on commit e62ad48

Please sign in to comment.