File tree Expand file tree Collapse file tree 3 files changed +45
-16
lines changed
Expand file tree Collapse file tree 3 files changed +45
-16
lines changed Original file line number Diff line number Diff line change 8989 - id : generate-info-json
9090 name : Fetch and update info.json for WPE release
9191 run : |
92- # Fetch the info.json file and set variables
93- curl -sSL "https://wpe-plugin-updates.wpengine.com/faustwp/info.json" -o info.json
94- current_time=$(date -u +"%Y-%m-%d %-I:%M%p GMT")
95- download_link="https://wpe-plugin-updates.wpengine.com/faustwp/faustwp.${{ env.VERSION }}.zip"
96-
97- # Update the info.json file with the new version and download link
98- jq \
99- --arg version "${{ env.VERSION }}" \
100- --arg last_updated "$current_time" \
101- --arg download_link "$download_link" \
102- --arg new_version "${{ env.VERSION }}" \
103- --arg new_download_link "https://wpe-plugin-updates.wpengine.com/faustwp/faustwp.${{ env.VERSION }}.zip" \
104- '.versions = {($new_version): $new_download_link} + .versions | .version=$version | .last_updated=$last_updated | .download_link=$download_link' \
105- info.json > info.json.tmp && mv info.json.tmp info.json
106-
107- # Output the modified file path
92+ ./scripts/add-wpe-version-info-file.sh ${{ env.VERSION }}
10893 echo "info-json-path=$PWD/info.json" >> $GITHUB_ENV
10994 shell : bash
11095
Original file line number Diff line number Diff line change 1+ #! /bin/bash
2+ VERSION=$1
3+
4+ curl -sSL " https://wpe-plugin-updates.wpengine.com/faustwp/info.json" -o info.json
5+ current_time=$( date -u +" %Y-%m-%d %-I:%M%p GMT" )
6+ download_link=" https://wpe-plugin-updates.wpengine.com/faustwp/faustwp.${VERSION} .zip"
7+
8+ # Update the info.json file with the new version and download link
9+ jq \
10+ --arg version " $VERSION " \
11+ --arg last_updated " $current_time " \
12+ --arg download_link " $download_link " \
13+ --arg new_version " $VERSION " \
14+ --arg new_download_link " https://wpe-plugin-updates.wpengine.com/faustwp/faustwp.${VERSION} .zip" \
15+ ' .versions = {($new_version): $new_download_link} + .versions | .version=$version | .last_updated=$last_updated | .download_link=$download_link' \
16+ info.json > info.json.tmp && mv info.json.tmp info.json
Original file line number Diff line number Diff line change 1+ name : Fetch, Modify, and Output info.json
2+
3+ on :
4+ push :
5+ branches :
6+ - bug-fix-github-workflow-faustwp-issues
7+
8+ jobs :
9+ fetch_modify_info_json :
10+ name : Fetch, Modify, and Output info.json
11+ runs-on : ubuntu-22.04
12+ steps :
13+ - name : Checkout Repository
14+ uses : actions/checkout@v4
15+
16+ - name : Fetch info.json
17+ run : |
18+ curl -sSL "https://wpe-plugin-updates.wpengine.com/faustwp/info.json" -o info.json
19+
20+ - name : Fetch and update info.json for WPE release
21+ run : |
22+ ./scripts/add-wpe-version-info-file.sh ${{ env.VERSION }}
23+ shell : bash
24+
25+ - name : Output modified info.json
26+ run : |
27+ echo "Modified info.json content:"
28+ cat info.json
You can’t perform that action at this time.
0 commit comments