Skip to content

Commit

Permalink
chore(ci): Update GitLab CI variables for current runner to allow job…
Browse files Browse the repository at this point in the history
… names with special chars
  • Loading branch information
alerque committed Jun 27, 2023
1 parent aea24f5 commit eddd059
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 6 deletions.
5 changes: 2 additions & 3 deletions README.md
Expand Up @@ -177,14 +177,13 @@ default:
name: "siletypesetter/casile:latest"
entrypoint: [""]
variables:
DISTDIR: $CI_PROJECT_NAME-$CI_JOB_NAME-$CI_COMMIT_SHORT_SHA
DISTDIR: $CI_PROJECT_NAME-$CI_JOB_NAME_SLUG-$CI_COMMIT_SHORT_SHA
casile:
script:
- casile make -- pdfs epub renderings
artifacts:
name: $DISTDIR
paths:
- ./$DISTDIR
paths: [ ./$DISTDIR/* ]
```
### Dependencies
Expand Down
2 changes: 1 addition & 1 deletion rules/rules.mk
Expand Up @@ -224,7 +224,7 @@ GITHUB_REF ?=
CI_COMMIT_TAG ?=
CI_MERGE_REQUEST_SOURCE_BRANCH_NAME ?=
GITHUB_BASE_REF ?=
CI_JOB_NAME ?=
CI_JOB_NAME_SLUG ?=

# Most CI runners need help getting the branch name because of sparse checkouts
BRANCH := $(subst refs/heads/,,$(or $(CI_COMMIT_REF_NAME),$(GITHUB_HEAD_REF),$(GITHUB_REF),$(shell $(_ENV) $(GIT) rev-parse --abbrev-ref HEAD)))
Expand Down
4 changes: 2 additions & 2 deletions rules/utilities.mk
Expand Up @@ -98,9 +98,9 @@ _gha:
echo "::set-output name=VERSION::$(call versioninfo,$(PROJECT))"

.PHONY: _glc
_glc: $(CI_JOB_NAME).env
_glc: $(CI_JOB_NAME_SLUG).env

$(CI_JOB_NAME).env: $(NONDISTGOALS)
$(CI_JOB_NAME_SLUG).env: $(NONDISTGOALS)
$(ZSH) << 'EOF' # inception to break out of CaSILE’s make shell wrapper
export PS4=; set -x ; exec 2> $@ # black magic to output sourcable content
DISTDIR="$(DISTDIR)"
Expand Down

0 comments on commit eddd059

Please sign in to comment.