diff --git a/.github/pull_request_template.md b/.github/pull_request_template.md index a4bd734..bc46e35 100644 --- a/.github/pull_request_template.md +++ b/.github/pull_request_template.md @@ -17,7 +17,6 @@ _(tick as appropriate)_ - [ ] PR completes task/fixes bug - [ ] Tests exercise code appropriately - [ ] New features and API breaks are flagged in commit messages using magic strings -- [ ] Repo maintainer is notified that a release is required - [ ] Documentation updated (README, Confluence, Docstrings, API spec, Engineering Guide, etc.) - [ ] Downstream repos have been checked for potential breaks & fixed as needed - [ ] APIs/UIs/CLIs updated as required diff --git a/.github/workflows/shared-ext-ci-workflow.yml b/.github/workflows/shared-ext-ci-workflow.yml index 5771e87..62f0387 100644 --- a/.github/workflows/shared-ext-ci-workflow.yml +++ b/.github/workflows/shared-ext-ci-workflow.yml @@ -56,7 +56,6 @@ on: env: PYTHON_VERSION: ${{ inputs.pythonVersion == '' && '3.10' || inputs.pythonVersion }} COMMONTOOLING_BRANCH: ${{ inputs.commontoolingBranch == '' && 'main' || inputs.commontoolingBranch }} - BUILD_TAG: ${{ github.run_id }} # This is currently used by commontooling to detect CI environments CHECKOUT_REF: ${{ inputs.checkoutRef == '' && github.ref || inputs.checkoutRef }} jobs: diff --git a/.github/workflows/shared-ext-release-workflow.yml b/.github/workflows/shared-ext-release-workflow.yml index 5c0eb51..ac7953d 100644 --- a/.github/workflows/shared-ext-release-workflow.yml +++ b/.github/workflows/shared-ext-release-workflow.yml @@ -20,7 +20,6 @@ on: env: COMMONTOOLING_BRANCH: ${{ inputs.commontoolingBranch == '' && 'main' || inputs.commontoolingBranch }} - BUILD_TAG: ${{ github.run_id }} # This is currently used by commontooling to detect CI environments jobs: CheckStaticFiles: diff --git a/static-commontooling/make/docker.mk b/static-commontooling/make/docker.mk index 47baa4b..c706009 100644 --- a/static-commontooling/make/docker.mk +++ b/static-commontooling/make/docker.mk @@ -148,8 +148,7 @@ include $(commontooling_dir)/make/include/dockerignore.mk # Some standard patterns with some variables to turn them on and off MS_DOCKER_ARTEFACT?=TRUE ifeq "${MS_DOCKER_ARTEFACT}" "TRUE" -artefact: ms_docker-build -artefacts: artefact +artefacts: ms_docker-build endif MS_DOCKER_SOURCE?=TRUE @@ -184,8 +183,7 @@ ms_docker-build-mypy: $(topdir)/.mypy.ini endif ms_docker-run-mypy: EXTRA_DOCKER_RUN_ARGS+=--mount type=bind,source=$(PIP_CONFIG_FILE),target=/etc/pip.conf,readonly -mypy: ms_docker-run-mypy -typecheck: mypy +typecheck: ms_docker-run-mypy endif $(topbuilddir)/.tmp/run_with_dir_modes.sh: $(commontooling_dir)/misc/run_with_dir_modes.sh $(topbuilddir)/.tmp @@ -227,7 +225,7 @@ upload-docker: enable_push=FALSE ifneq "${VERSION}" "${NEXT_VERSION}" enable_push=TRUE -else ifneq "${BUILD_TAG}" "local" +else ifeq "${GITHUB_ACTIONS}" "true" enable_push=TRUE endif @@ -284,4 +282,4 @@ endif echo " $(DOCKER_COMPOSE) "; \ fi -.PHONY: help-docker artefact upload-docker mypy typecheck artefacts +.PHONY: help-docker upload-docker typecheck artefacts diff --git a/static-commontooling/make/include/core.mk b/static-commontooling/make/include/core.mk index 8ea9d2c..a17c849 100644 --- a/static-commontooling/make/include/core.mk +++ b/static-commontooling/make/include/core.mk @@ -34,10 +34,10 @@ CLOUDFIT_BASE_LABEL?=latest endif # Set python pip config location -ifeq "${BUILD_TAG}" "local" -PIP_CONFIG_FILE?=/etc/pip.conf -else +ifeq "${GITHUB_ACTIONS}" "true" PIP_CONFIG_FILE?=$(project_root_dir)/.pip.conf +else +PIP_CONFIG_FILE?=/etc/pip.conf endif CLOUDFIT_BASE_NAME?=python diff --git a/static-commontooling/make/include/pythonic_version.mk b/static-commontooling/make/include/pythonic_version.mk index d237b6a..ab8a52b 100644 --- a/static-commontooling/make/include/pythonic_version.mk +++ b/static-commontooling/make/include/pythonic_version.mk @@ -68,11 +68,11 @@ $(topdir)/.tmp/_next_version.py: $(topdir)/.tmp @echo "git_commit = '0000000'" >> $(topdir)/.tmp/_next_version.py -ifeq "${BUILD_TAG}" "local" -$(VERSIONFILE): $(topdir)/.tmp/_next_version.py +ifeq "${GITHUB_ACTIONS}" "true" +$(VERSIONFILE): $(topdir)/.tmp/_full_version.py cp $< $@ else -$(VERSIONFILE): $(topdir)/.tmp/_full_version.py +$(VERSIONFILE): $(topdir)/.tmp/_next_version.py cp $< $@ endif diff --git a/static-commontooling/make/include/version.mk b/static-commontooling/make/include/version.mk index 3546654..3136eba 100644 --- a/static-commontooling/make/include/version.mk +++ b/static-commontooling/make/include/version.mk @@ -32,18 +32,9 @@ version: next-version: @echo $(NEXT_VERSION) -ifeq "${topdir}" "${project_root_dir}" -release: - git tag -a $(NEXT_VERSION) -m "v.$(NEXT_VERSION)" - @echo "Added tag $(NEXT_VERSION) at commit $(GITCOMMIT), to push it up use: git push origin --tags" -endif - help-version: @echo "$(PROJECT)-$(VERSION)" @echo "make version - Print the current version of the code in the repo, including pre-release indicators" @echo "make next-version - Print the version the code should have if it is released as it currently is" -ifeq "${topdir}" "${project_root_dir}" - @echo "make release - Add a tag to the repo marking the current commit as a release" -endif -.PHONY: version next-version help-version release +.PHONY: version next-version help-version diff --git a/static-commontooling/make/pythonic.mk b/static-commontooling/make/pythonic.mk index 7eda64d..9454ca9 100644 --- a/static-commontooling/make/pythonic.mk +++ b/static-commontooling/make/pythonic.mk @@ -48,10 +48,10 @@ CLEAN_FILES += $(topbuilddir)/dist # Add extra dependencies to the core targets all: help-pythonic -ifeq "${BUILD_TAG}" "local" -VERSION_IN_PYTHON=${NEXT_VERSION} -else +ifeq "${GITHUB_ACTIONS}" "true" VERSION_IN_PYTHON=${VERSION} +else +VERSION_IN_PYTHON=${NEXT_VERSION} endif WHEEL_FILE?=$(topbuilddir)/dist/$(MODNAME)-$(VERSION)-py3-none-any.whl diff --git a/static-commontooling/make/standalone.mk b/static-commontooling/make/standalone.mk index 7346684..cd9fdeb 100644 --- a/static-commontooling/make/standalone.mk +++ b/static-commontooling/make/standalone.mk @@ -48,7 +48,6 @@ commontooling_dir?=$(project_root_dir)/commontooling endif include $(commontooling_dir)/make/include/core.mk --include $(project_root_dir)/commontooling/make/include/jenkinsfile.mk -include $(project_root_dir)/commontooling/make/include/pull_request_template.mk include $(commontooling_dir)/make/include/gitignore.mk