Skip to content

Commit

Permalink
Merge branch 'dev'
Browse files Browse the repository at this point in the history
  • Loading branch information
Gaz492 committed Dec 2, 2024
2 parents 65eff4e + 6f3a5d3 commit b15ba93
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 11 deletions.
19 changes: 9 additions & 10 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -183,16 +183,6 @@ jobs:
wget -q -O /usr/local/bin/b2 https://github.com/Backblaze/B2_Command_Line_Tool/releases/latest/download/b2-linux
chmod +x /usr/local/bin/b2
- name: Create post-body.json
if: "!contains(github.ref_name, 'beta')"
shell: bash
run: |
echo "$PWD"
bash gen-version.sh
cat post-body.json
curl --fail -X POST "https://example.com/api/endpoint" -H "Content-Type: application/json" -u "admin:$META_API_TOKEN" -d @./post-body.json
- name: Upload
if: "!contains(github.ref_name, 'beta')"
shell: bash
Expand All @@ -202,6 +192,15 @@ jobs:
b2 sync --replace-newer --no-progress release b2://${{ secrets.PUBLISH_BUCKET }}/bin/server-installer/latest/
b2 sync --replace-newer --no-progress release b2://${{ secrets.PUBLISH_BUCKET }}/bin/server-installer/$GITHUB_REF_NAME/
- name: Create post-body.json
if: "!contains(github.ref_name, 'beta')"
shell: bash
run: |
echo "$PWD"
bash gen-version.sh
cat post-body.json
curl --fail -X POST "https://api.feed-the-beast.com/v1/meta/versions/server-installer" -H "Content-Type: application/json" -u "admin:$META_API_TOKEN" -d @./post-body.json
# Release to GitHub
- name: Github Release
if: "!contains(github.ref_name, 'beta')"
Expand Down
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,5 @@ test/*
out/

.git-old/

post-body.json
2 changes: 1 addition & 1 deletion gen-version.sh
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ while read -r file; do
filename=$(basename "$file")
if [[ $filename =~ ^ftb-server-([a-zA-Z0-9]+)-([a-zA-Z0-9]+)(\.exe)?$ ]]; then
bin_name="${BASH_REMATCH[1]}-${BASH_REMATCH[2]}"
bin_url="https://cdn.feed-the-beast.com/bin/server-installer/${version}/ftb-server-${bin_name}"
bin_url="https://cdn.feed-the-beast.com/bin/server-installer/${version}/ftb-server-${bin_name}${BASH_REMATCH[3]}"
foundBins["$bin_name"]="$bin_url"
echo "$bin_name"
fi
Expand Down

0 comments on commit b15ba93

Please sign in to comment.