Skip to content

Commit 2b62b83

Browse files
committed
Make the python a 1 liner for playground build url
1 parent 4317353 commit 2b62b83

1 file changed

Lines changed: 1 addition & 7 deletions

File tree

.github/workflows/build-plugin-with-ref.yml

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -287,13 +287,7 @@ jobs:
287287
288288
build_playground_url() {
289289
local plugin_url="$1"
290-
python3 -c 'import base64,json,sys,urllib.parse
291-
plugin_url=sys.argv[1]
292-
blueprint={"landingPage":"/wp-admin/plugins.php","steps":[{"step":"login"},{"step":"installPlugin","pluginZipFile":{"resource":"url","url":plugin_url}},{"step":"activatePlugin","pluginPath":"accessibility-checker/accessibility-checker.php"}]}
293-
blueprint_json=json.dumps(blueprint,separators=(",",":"))
294-
data_uri="data:application/json;base64,"+base64.b64encode(blueprint_json.encode("utf-8")).decode("ascii")
295-
encoded_blueprint_url=urllib.parse.quote(data_uri,safe="")
296-
print(f"https://playground.wordpress.net/?blueprint-url={encoded_blueprint_url}")' "$plugin_url"
290+
python3 -c 'import base64,json,sys,urllib.parse; plugin_url=sys.argv[1]; blueprint={"landingPage":"/wp-admin/plugins.php","steps":[{"step":"login"},{"step":"installPlugin","pluginZipFile":{"resource":"url","url":plugin_url}},{"step":"activatePlugin","pluginPath":"accessibility-checker/accessibility-checker.php"}]}; blueprint_json=json.dumps(blueprint,separators=(",",":")); data_uri="data:application/json;base64,"+base64.b64encode(blueprint_json.encode("utf-8")).decode("ascii"); encoded_blueprint_url=urllib.parse.quote(data_uri,safe=""); print(f"https://playground.wordpress.net/?blueprint-url={encoded_blueprint_url}")' "$plugin_url"
297291
}
298292
299293
PRIMARY_PLAYGROUND_URL=""

0 commit comments

Comments
 (0)