mirror of
https://github.com/GeyserMC/Geyser.git
synced 2024-08-14 23:57:35 +00:00
Don't use tee to write metadata.json to downloads API (#4612)
This commit is contained in:
parent
42a9ba617b
commit
9cb9a1450e
2 changed files with 8 additions and 5 deletions
7
.github/workflows/build.yml
vendored
7
.github/workflows/build.yml
vendored
|
@ -136,14 +136,15 @@ jobs:
|
||||||
run: |
|
run: |
|
||||||
cat metadata.json
|
cat metadata.json
|
||||||
echo
|
echo
|
||||||
|
mv metadata.json metadata.json.tmp
|
||||||
version=$(cat gradle.properties | grep -o "version=[0-9\\.]*" | cut -d"=" -f2)
|
version=$(cat gradle.properties | grep -o "version=[0-9\\.]*" | cut -d"=" -f2)
|
||||||
cat metadata.json | jq --arg project "${PROJECT}" --arg version "${version}" '
|
jq --arg project "${PROJECT}" --arg version "${version}" '
|
||||||
.
|
.
|
||||||
| .changes |= map({"commit", "summary", "message"})
|
| .changes |= map({"commit", "summary", "message"})
|
||||||
| .downloads |= map_values({"name", "sha256"})
|
| .downloads |= map_values({"name", "sha256"})
|
||||||
| {$project, "repo", $version, "number": .build, "changes", "downloads"}
|
| {$project, "repo", $version, "number": .build, "changes", "downloads"}
|
||||||
' | tee metadata.json
|
' metadata.json.tmp > metadata.json
|
||||||
echo
|
cat metadata.json
|
||||||
- name: Publish to Downloads API
|
- name: Publish to Downloads API
|
||||||
if: ${{ success() && github.repository == 'GeyserMC/Geyser' && github.ref_name == 'master' }}
|
if: ${{ success() && github.repository == 'GeyserMC/Geyser' && github.ref_name == 'master' }}
|
||||||
shell: bash
|
shell: bash
|
||||||
|
|
6
.github/workflows/preview.yml
vendored
6
.github/workflows/preview.yml
vendored
|
@ -69,11 +69,13 @@ jobs:
|
||||||
run: |
|
run: |
|
||||||
cat metadata.json
|
cat metadata.json
|
||||||
echo
|
echo
|
||||||
cat metadata.json | jq --arg project "${PROJECT}" --arg version "${VERSION}" --arg number "${BUILD}" '
|
mv metadata.json metadata.json.tmp
|
||||||
|
jq --arg project "${PROJECT}" --arg version "${VERSION}" --arg number "${BUILD}" '
|
||||||
.
|
.
|
||||||
| .downloads |= map_values({"name", "sha256"})
|
| .downloads |= map_values({"name", "sha256"})
|
||||||
| {$project, "repo", $version, "number": $number | tonumber, "changes": [], "downloads"}
|
| {$project, "repo", $version, "number": $number | tonumber, "changes": [], "downloads"}
|
||||||
' | tee metadata.json
|
' metadata.json.tmp > metadata.json
|
||||||
|
cat metadata.json
|
||||||
- name: Publish to Downloads API
|
- name: Publish to Downloads API
|
||||||
if: success()
|
if: success()
|
||||||
shell: bash
|
shell: bash
|
||||||
|
|
Loading…
Reference in a new issue