Skip to content

Commit

Permalink
🔨 Rest development versions to post0 (#181)
Browse files Browse the repository at this point in the history
  • Loading branch information
pcrespov authored Aug 29, 2024
1 parent 0aa2738 commit be97143
Show file tree
Hide file tree
Showing 2 changed files with 40 additions and 17 deletions.
53 changes: 38 additions & 15 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -9,21 +9,44 @@ PYTHON_DIR := $(CLIENTS_DIR)/python
@echo "WARNING ##### $@ does not exist, cloning $< as $@ ############"; cp $< $@)


.PHONY: info
info: ## general information
# system
@echo ' CURDIR : ${CURDIR}'
@echo ' NOW_TIMESTAMP : ${NOW_TIMESTAMP}'
@echo ' VCS_URL : ${VCS_URL}'
@echo ' VCS_REF : ${VCS_REF}'
# installed in .venv
@which python
@pip list
# API
@echo ' title : $(shell bash $(SCRIPTS_DIR)/jq.bash -r .info.title $(REPO_ROOT)/api/openapi.json)'
@echo ' version : $(shell bash $(SCRIPTS_DIR)/jq.bash -r .info.version $(REPO_ROOT)/api/openapi.json)'
# nox
@echo nox --list-session
.PHONY: info-api info-envs info-tools info-pip info

info-api: ## info on openapi specs
# Openapi specs ---------
@echo ' title : $(shell bash $(SCRIPTS_DIR)/jq.bash -r .info.title $(REPO_ROOT)/api/openapi.json)'
@echo ' version : $(shell bash $(SCRIPTS_DIR)/jq.bash -r .info.version $(REPO_ROOT)/api/openapi.json)'


info-envs: ## info on envs
# Environments ----------
@echo ' CURDIR : ${CURDIR}'
@echo ' NOW_TIMESTAMP : ${NOW_TIMESTAMP}'
@echo ' VCS_URL : ${VCS_URL}'
@echo ' VCS_REF : ${VCS_REF}'


info-tools: ## info on tooling
# Tooling ---------------
@echo ' make : $(shell make --version 2>&1 | head -n 1)'
@echo ' jq : $(shell jq --version)'
@echo ' awk : $(shell awk -W version 2>&1 | head -n 1)'
@echo ' python : $(shell python3 --version)'
@echo ' uv : $(shell uv --version)'
@echo ' docker : $(shell docker --version)'
@echo ' docker buildx : $(shell docker buildx version)'
@echo ' docker compose : $(shell docker compose version)'


info-pip: ## info index versions
# Pypi ------------------
@pip index versions \
osparc \
--pre \
--index-url https://test.pypi.org/simple/ \
--extra-index-url https://pypi.org/simple/


info: info-api info-envs info-tools info-pip ## all infos


.venv: .check-uv-installed
Expand Down
4 changes: 2 additions & 2 deletions scripts/generate_version.bash
Original file line number Diff line number Diff line change
Expand Up @@ -22,15 +22,15 @@ n_commits_to_merge_base=$(git rev-list --count "${merge_base}".."${current_commi

# NOTE:
# - we develop using post-release versioning
# - i.e. 1.2.3.post3.devN where N is the number of commits with respect to last release 1.2.3)
# - i.e. 1.2.3.post0.devN where N is the number of commits with respect to last release 1.2.3)
# - Another approach would be using a pre-release version but we do not want to decide on that version
# - the releases are of the type 1.2.3
# - we never do post releases as 1.2.3.postX but instead use patches i.e. 1.2.4
# - the releases are defined using git tags (that is the case with n_commits_to_merge_base=0 )
# - SEE .github/workflows/publish-python-client.yml for more details
#
if [ "$n_commits_to_merge_base" -gt 0 ]; then
echo "${released_version}.post3.dev${n_commits_to_merge_base}"
echo "${released_version}.post0.dev${n_commits_to_merge_base}"
elif [ "$n_commits_to_merge_base" -eq 0 ]; then
echo "${released_version}"
else
Expand Down

0 comments on commit be97143

Please sign in to comment.