Skip to content

Commit

Permalink
[INTERNAL] Add script to update testRunner resources
Browse files Browse the repository at this point in the history
  • Loading branch information
matz3 committed Sep 2, 2020
1 parent bfe1c39 commit 8864ed4
Showing 1 changed file with 28 additions and 0 deletions.
28 changes: 28 additions & 0 deletions scripts/update-testRunner-resources.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
#!/bin/bash

set -e

# Go to project root
cd "$(dirname -- "$0")/.."

# Download latest files
cd lib/middleware/testRunner
curl -L -O https://github.com/SAP/openui5/raw/master/src/sap.ui.core/test/sap/ui/qunit/TestRunner.js
curl -L -O https://github.com/SAP/openui5/raw/master/src/sap.ui.core/test/sap/ui/qunit/testrunner.css
curl -L -O https://github.com/SAP/openui5/raw/master/src/sap.ui.core/test/sap/ui/qunit/testrunner.html

# Check if there are updates
git diff --quiet && echo "No updates. Exiting..." && exit 0

# Get latest commit url for src/sap.ui.core/test/sap/ui/qunit path
COMMIT_URL=$(curl "https://github.com/gitapi/repos/SAP/openui5/commits?sha=master&path=src/sap.ui.core/test/sap/ui/qunit" | \
node -r fs -e "process.stdout.write(JSON.parse(fs.readFileSync(\"/dev/stdin\", \"utf8\"))[0].html_url)")

echo "Creating new commit..."

# Add changes and create commit
git add .
git commit \
-m "[FIX] middleware/testRunner: Update resources from OpenUI5" \
-m "Based on:
$COMMIT_URL"

0 comments on commit 8864ed4

Please sign in to comment.