Open Glusk opened 5 years ago
@glusk2/z this project will fix the problem faster if you donate a few dollars to it; just click here and pay via Stripe, it's very fast, convenient and appreciated; thanks a lot!
@rultor config
@glusk2 This is how I understand the
.rultor.yml
file in the root directory of your base branch:<?xml version="1.0" encoding="UTF-8"?> <p> <entry key="architect"> <item>Glusk2</item> </entry> <entry key="docker"> <entry key="image">mingc/android-build-box:1.12.0</entry> </entry> <entry key="release"> <entry key="script"> <item>chmod +x gradlew</item> <item>perl -i.orig -pe '/versionCode/ && s/([0-9]+)/$1+1 . $2/e' android/build.gradle</item> <item>version=${tag#'v'}</item> <item>./gradlew release -Prelease.useAutomaticVersion=true -Prelease.releaseVersion=$version -Prelease.newVersion=$version-SNAPSHOT</item> </entry> </entry> </p>
This page explains how to configure it.
Originally posted by @rultor in https://github.com/Glusk2/sprouts/issues/163#issuecomment-544206038
The following script
line:
- "version=${tag#'v'}"
is successfully stored as an XML element in rultor store:
<item>version=${tag#'v'}</item>
but on rultor execution it degenerates into:
version=${tag`#'\''\'\'''\''v'\''\'\'''\''}`
@Glusk2 the problem still exists?
@yegor256 I have since migrated the project to another automated release solution.
But the issue is still present in rultor.
.rultor.yml
:
architect:
- Glusk2
release:
script:
- "version=${tag#'v'}"
Such configuration would fail upon invoking rultor like this:
@rultor release, tag=
v1.0.0
It does seem futile to undo all the effort that was put into dealing with the comment lines and make significant changes to how rultor starts its builds (as suggested here)
But as it stands, the following commands will not work in .rultor.yml
:
${#parameter}
${parameter#word}
${parameter##word}
Resource: Shell Parameter Expansion
@yegor256
Unfortunately the information on the topic of this issue is scattered between several other issues.
Here is a list of my comments in related issues:
This is a full list of related issues:
# comments!
)echo "# comments!"
and echo '# comments!'
).rultor.yml
configuration that was failing, although the error messages seem similar)
This is the
.rultor.yml
file I am using:The online parser classifies it as a valid
yml
and parses it successfully. YAMLlint also confirms that it is in fact a valid.yml
file!However, invoking rultor like this:
failed with this error message (full log):