Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/main'
Browse files Browse the repository at this point in the history
  • Loading branch information
YuryHrytsuk committed Nov 23, 2023
2 parents 6de3477 + b68814b commit 89d237d
Show file tree
Hide file tree
Showing 7 changed files with 233 additions and 210 deletions.
17 changes: 14 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -179,12 +179,22 @@ _git_get_current_branch = $(shell git rev-parse --abbrev-ref HEAD)
_git_get_formatted_staging_tag = ${staging_prefix}${name}$(version)
_git_get_formatted_release_tag = ${release_prefix}$(version)
_git_list_remote_tags = $(shell git ls-remote --tags origin)

_prettify_logs = $$(git log \
$$(git describe --match="$(if $(findstring -staging, $@),$(staging_prefix),$(release_prefix))*" --abbrev=0 --tags)..$(if $(git_sha),$(git_sha),HEAD) \
--pretty=format:"- %s")
# NOTE: be careful that GNU Make replaces newlines with space which is why this command cannot work using a Make function


define create_github_release_url
# ensure tags are uptodate
echo -e "\e[33mChangelog:\e[0m" && \
echo -e "\e[34m$(_prettify_logs)\e[0m"
endef

.PHONY: release-prod
release-prod: ## Helper to create a staging or production release in Github (usage: make release-prod version=1.2.3)
@currentDesiredTag=$(_git_get_formatted_release_tag) && \
@echo $(create_github_release_url); \
currentDesiredTag=$(_git_get_formatted_release_tag) && \
if $$(echo $(_git_list_remote_tags) | grep -q "refs/tags/$$currentDesiredTag"); then \
echo "Tag $$currentDesiredTag is already present on remote"; \
echo -n "Are you sure you want to retag? This will delete the old tag on the git remote. [y/N] " && read ans && [ $${ans:-N} = y ] && \
Expand All @@ -204,7 +214,8 @@ release-prod: ## Helper to create a staging or production release in Github (usa

.PHONY: release-staging
release-staging: ## Helper to create a staging or production release in Github (usage: make release-staging name=sprint version=1 )
@currentDesiredTag=$(_git_get_formatted_staging_tag) && \
@echo $(create_github_release_url); \
currentDesiredTag=$(_git_get_formatted_staging_tag) && \
if $$(echo $(_git_list_remote_tags) | grep -q "refs/tags/$$currentDesiredTag"); then \
echo "Tag $$currentDesiredTag is already present on remote"; \
echo -n "Are you sure you want to retag? This will delete the old tag on the git remote. [y/N] " && read ans && [ $${ans:-N} = y ] && \
Expand Down
2 changes: 1 addition & 1 deletion scripts/deployments/validate_simcore_stack_yml.bash
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ do
if [ "${TARGETNAME}" == "whoami" ]; then
continue
fi
export TARGETFILE="simcore-service-${TARGETNAME}"
export TARGETFILE="simcore-service"
echo TARGETFILE="${TARGETFILE}"
echo "Assuming targetfile in ${SETTINGS_BINARY_PATH}/${TARGETFILE}"
echo "Checking ${SETTINGS_BINARY_PATH}/${TARGETFILE}"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,8 @@ source "$repo_basedir"/scripts/logger.bash
repo_config=$(cat "$repo_basedir"/.config.location)
set -o allexport
# shellcheck disable=SC1090
export SIMCORE_IMAGE_TAG=master-github-latest
# shellcheck source=/dev/null.
source "$repo_config"
set +o allexport
#####################
Expand Down
Loading

0 comments on commit 89d237d

Please sign in to comment.