Skip to content

Commit 8864ed4

Browse files
committed
[INTERNAL] Add script to update testRunner resources
1 parent bfe1c39 commit 8864ed4

File tree

1 file changed

+28
-0
lines changed

1 file changed

+28
-0
lines changed
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
#!/bin/bash
2+
3+
set -e
4+
5+
# Go to project root
6+
cd "$(dirname -- "$0")/.."
7+
8+
# Download latest files
9+
cd lib/middleware/testRunner
10+
curl -L -O https://github.com/SAP/openui5/raw/master/src/sap.ui.core/test/sap/ui/qunit/TestRunner.js
11+
curl -L -O https://github.com/SAP/openui5/raw/master/src/sap.ui.core/test/sap/ui/qunit/testrunner.css
12+
curl -L -O https://github.com/SAP/openui5/raw/master/src/sap.ui.core/test/sap/ui/qunit/testrunner.html
13+
14+
# Check if there are updates
15+
git diff --quiet && echo "No updates. Exiting..." && exit 0
16+
17+
# Get latest commit url for src/sap.ui.core/test/sap/ui/qunit path
18+
COMMIT_URL=$(curl "https://api.github.com/repos/SAP/openui5/commits?sha=master&path=src/sap.ui.core/test/sap/ui/qunit" | \
19+
node -r fs -e "process.stdout.write(JSON.parse(fs.readFileSync(\"/dev/stdin\", \"utf8\"))[0].html_url)")
20+
21+
echo "Creating new commit..."
22+
23+
# Add changes and create commit
24+
git add .
25+
git commit \
26+
-m "[FIX] middleware/testRunner: Update resources from OpenUI5" \
27+
-m "Based on:
28+
$COMMIT_URL"

0 commit comments

Comments
 (0)