Skip to content

Commit cf14b7f

Browse files
committed
[INTERNAL] Add script to update testRunner resources
1 parent 4e70c09 commit cf14b7f

File tree

2 files changed

+29
-0
lines changed

2 files changed

+29
-0
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,3 +61,4 @@ deploy_key
6161
!test/fixtures/**/node_modules
6262
test/tmp/
6363
jsdocs/
64+
tmp/
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)