Skip to content

Commit

Permalink
Run inside a condition
Browse files Browse the repository at this point in the history
  • Loading branch information
emilymclean committed Jul 10, 2024
1 parent 9871534 commit ce818a5
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 6 deletions.
10 changes: 7 additions & 3 deletions .github/workflows/build.pkl
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,13 @@ jobs = (b.jobs) {
id = "version"
run = """
regex="\\"version\\": \\"(.+)\\","
(cat ./type-generator/lemmy-js-client/package.json) =~ $regex
echo ${BASH_REMATCH[1]}
lemmyVersion=${BASH_REMATCH[1]} >> $GITHUB_ENV
if [[ (cat ./type-generator/lemmy-js-client/package.json) =~ $regex ]]
then
echo ${BASH_REMATCH[1]}
lemmyVersion=${BASH_REMATCH[1]} >> $GITHUB_ENV
else
exit 1;
fi
"""
}
}
Expand Down
10 changes: 7 additions & 3 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -145,6 +145,10 @@ jobs:
- id: version
run: |-
regex="\"version\": \"(.+)\","
(cat ./type-generator/lemmy-js-client/package.json) =~ $regex
echo ${BASH_REMATCH[1]}
lemmyVersion=${BASH_REMATCH[1]} >> $GITHUB_ENV
if [[ (cat ./type-generator/lemmy-js-client/package.json) =~ $regex ]]
then
echo ${BASH_REMATCH[1]}
lemmyVersion=${BASH_REMATCH[1]} >> $GITHUB_ENV
else
exit 1;
fi

0 comments on commit ce818a5

Please sign in to comment.