Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Miroslav Kratochvil
jekyll-theme-lcsb-default
Commits
88d634f7
Commit
88d634f7
authored
Apr 08, 2020
by
Jacek Lebioda
Browse files
feat: make sure that the tagging runs only on latest
parent
dd48e270
Changes
1
Hide whitespace changes
Inline
Side-by-side
.gitlab-ci.yml
View file @
88d634f7
...
...
@@ -37,14 +37,15 @@ pages:
-
public
# This will tag the repository when the version-file changes and the theme successfully builds
tag
:
auto-
tag
:
stage
:
deploy
variables
:
VERSION_FILE
:
"
lib/jekyll-theme-lcsb-default.rb"
rules
:
# Run only on branch named "latest"
-
if
:
$CI_COMMIT_BRANCH == "latest"
TARGET_BRANCH
:
latest
script
:
# Make sure that it is on latest, otherwise exit
-
[[
"
${CI_COMMIT_BRANCH:-1}"
== "$TARGET_BRANCH"
]]
&&
echo "On correct branch ($CI_COMMIT_BRANCH)" || exit
0
# Make sure that the version exists
-
VERSION=$(cat $VERSION_FILE | grep -o "\d\.\d\.\d")
-
'
[[
-z
$VERSION
]]
&&
exit
-1
||
echo
"OK,
version
appears
to
be
correct
->
$VERSION"'
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment