Skip to content

Commit

Permalink
Just pick the one line I want
Browse files Browse the repository at this point in the history
I know this is a hack, but I shouldn't be parsing with regex anyway
  • Loading branch information
emilymclean committed Jul 10, 2024
1 parent a6a99f1 commit fb50f02
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 11 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/build.pkl
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import "pkl/src/common.pkl" as common
projectName = "jlemmy"

local b = (import("pkl/build.pkl")) {
projectName = ""
projectName = "jlemmy"
}

jobs = (b.jobs) {
Expand All @@ -22,8 +22,8 @@ jobs = (b.jobs) {
new CommandStep {
id = "version"
run = """
regex='"version": "((\\d+\\.){2}(\\d+)(-\\w+\\d)?)",'
contents="$(cat ./type-generator/lemmy-js-client/package.json)"
regex='"version": "(.*)",'
contents="$(cat ./type-generator/lemmy-js-client/package.json | grep "version")"
if [[ $contents =~ $regex ]]
then
echo ${BASH_REMATCH[1]}
Expand Down
16 changes: 8 additions & 8 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -55,11 +55,11 @@ jobs:
with:
arguments: build
- name: Rename AAR
run: mv ./build/libs/-${{ needs.version.outputs.version }}.jar ./.jar
run: mv ./build/libs/jlemmy-${{ needs.version.outputs.version }}.jar ./jlemmy.jar
- uses: actions/upload-artifact@master
with:
name: -jar
path: ./.jar
name: jlemmy-jar
path: ./jlemmy.jar
release:
permissions:
contents: write
Expand Down Expand Up @@ -91,16 +91,16 @@ jobs:
steps:
- uses: actions/download-artifact@master
with:
name: -jar
name: jlemmy-jar
path: ./
- name: Upload Artifact to Release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
uses: actions/upload-release-asset@v1
with:
upload_url: ${{ needs.release.outputs.upload_url }}
asset_path: ./.jar
asset_name: -v${{ needs.version.outputs.version }}.jar
asset_path: ./jlemmy.jar
asset_name: jlemmy-v${{ needs.version.outputs.version }}.jar
asset_content_type: application/zip
publish-sonatype:
permissions:
Expand Down Expand Up @@ -144,8 +144,8 @@ jobs:
submodules: true
- id: version
run: |-
regex='"version": "((\d+\.){2}(\d+)(-\w+\d)?)",'
contents="$(cat ./type-generator/lemmy-js-client/package.json)"
regex='"version": "(.*)",'
contents="$(cat ./type-generator/lemmy-js-client/package.json | grep "version")"
if [[ $contents =~ $regex ]]
then
echo ${BASH_REMATCH[1]}
Expand Down

0 comments on commit fb50f02

Please sign in to comment.