-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* 7.2.0
- Loading branch information
Showing
22 changed files
with
237 additions
and
288 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,126 @@ | ||
#!/bin/bash | ||
set -eu -o pipefail | ||
|
||
cmd="$1" | ||
|
||
if test ! "$cmd"; then | ||
echo "command required." | ||
echo | ||
echo "available commands:" | ||
echo " update-deps update project dependencies" | ||
echo " test run application tests" | ||
echo " lint run linters" | ||
echo " update-test-fixtures update static files used during testing" | ||
exit 1 | ||
fi | ||
|
||
shift | ||
rest=$* | ||
|
||
if test "$cmd" = "update-deps"; then | ||
lein ancient | ||
exit 0 | ||
|
||
elif test "$cmd" = "test"; then | ||
# always ratchet *upwards* | ||
fail_threshold=80 | ||
# this file can't live in src/strongbox because lein-cloverage can't be found during dev. | ||
# so we copy it in and destroy it afterwards | ||
cp cloverage.clj src/strongbox/cloverage.clj | ||
rm -rf ./coverage/ # any coverage reports from previous run | ||
|
||
function finish { | ||
rm src/strongbox/cloverage.clj | ||
|
||
# 'lein clean' wipes out the 'target' directory, including the Cloverage report | ||
if [ -d target/coverage ]; then | ||
echo | ||
echo "wrote coverage/index.html" | ||
mv target/coverage coverage | ||
fi | ||
lein clean | ||
} | ||
trap finish EXIT | ||
if which xvfb-run; then | ||
# CI | ||
xvfb-run lein cloverage --runner "strongbox" | ||
else | ||
# dev | ||
lein cloverage --runner "strongbox" --fail-threshold "$fail_threshold" --html | ||
fi | ||
exit 0 | ||
|
||
elif test "$cmd" = "lint"; then | ||
if which joker > /dev/null; then | ||
echo "joker lint" | ||
joker --lint --working-dir ./ | ||
fi | ||
echo "cljfmt lint" | ||
lein cljfmt fix | ||
echo "eastwood lint" | ||
lein eastwood | ||
exit 0 | ||
|
||
elif test "$cmd" = "update-test-fixtures"; then | ||
# downloads new test fixtures | ||
function dl { | ||
url="$1" | ||
fname="$2" | ||
if [[ "$fname" == *json ]]; then | ||
curl --silent "$url" | jq . > "test/fixtures/$fname" | ||
else | ||
curl --silent "$url" > "test/fixtures/$fname" | ||
fi | ||
echo "$fname" | ||
} | ||
|
||
# curseforge | ||
dl "https://www.curseforge.com/wow/addons?filter-sort=name&page=1" "curseforge-addon-summary-listing.html" | ||
|
||
# curseforge api | ||
dl "https://addons-ecs.forgesvc.net/api/v2/addon/327019" "curseforge-api-addon--everyaddon.json" | ||
cp "test/fixtures/curseforge-api-addon--everyaddon.json" "test/fixtures/curseforge-api-addon--everyotheraddon.json" | ||
## one search result | ||
dl "https://addons-ecs.forgesvc.net/api/v2/addon/search?gameId=1&index=0&pageSize=1&searchFilter=&sort=2" "curseforge-api-search--truncated.json" | ||
|
||
# wowinterface | ||
dl "https://wowinterface.com/addons.php" "wowinterface-category-list.html" | ||
dl "https://www.wowinterface.com/downloads/cat19.html" "wowinterface-category-page.html" | ||
dl "https://www.wowinterface.com/downloads/info9085-Dominos.html" "wowinterface-addon-page.html" | ||
|
||
# wowinterface api | ||
dl "https://api.mmoui.com/v3/game/WOW/filelist.json" "wowinterface-api--complete.json" | ||
dl "https://api.mmoui.com/v3/game/WOW/filedetails/25122.json" "wowinterface-api--addon-details.json" | ||
dl "https://api.mmoui.com/v3/game/WOW/filedetails/24910.json" "wowinterface-api--addon-details-classic.json" # WeakAuras2 | ||
|
||
# github api | ||
dl "https://api.github.com/repos/Robert388/Necrosis-classic/releases" "github-repo-releases--no-assets.json" | ||
dl "https://api.github.com/repos/jsb/RingMenu/releases" "github-repo-releases--single-asset-classic.json" | ||
dl "https://api.github.com/repos/jsb/RingMenu/releases" "github-repo-releases--broken-assets.json" | ||
dl "https://api.github.com/repos/Ravendwyr/Chinchilla/releases" "github-repo-releases--many-assets-many-gametracks.json" | ||
dl "https://api.github.com/repos/Ravendwyr/Chinchilla/contents" "github-repo-contents--many-assets-many-gametracks.json" | ||
|
||
# gitlab api | ||
dl "https://gitlab.com/api/v4/projects/woblight%2Fnitro" "gitlab-repo--woblight-nitro.json" | ||
dl "https://gitlab.com/api/v4/projects/woblight%2Fnitro/releases" "gitlab-repo-releases--woblight-nitro.json" | ||
dl "https://gitlab.com/api/v4/projects/woblight%2Fnitro/repository/tree" "gitlab-repo-tree--woblight-nitro.json" | ||
dl "https://gitlab.com/api/v4/projects/thing-engineering%2Fwowthing%2Fwowthing-collector/repository/blobs/125c899d813d2e11c976879f28dccc2a36fd207b" "gitlab-repo-blobs--wowthing.json" | ||
dl "https://gitlab.com/api/v4/projects/woblight%2Fnitro/repository/tree" "gitlab-repo-tree--woblight-nitro.json" | ||
|
||
# tukui api | ||
dl "https://www.tukui.org/api.php?addon=98" "tukui--addon-details.json" | ||
dl "https://www.tukui.org/api.php?classic-addon=13" "tukui--classic-addon-details.json" | ||
dl "https://www.tukui.org/api.php?ui=tukui" "tukui--tukui-addon-proper.json" | ||
dl "https://www.tukui.org/api.php?ui=elvui" "tukui--elvui-addon-proper.json" | ||
|
||
# user-catalogue | ||
dl "https://api.github.com/repos/Stanzilla/AdvancedInterfaceOptions/releases" "user-catalogue--github.json" | ||
|
||
exit 0 | ||
|
||
# ... | ||
|
||
fi | ||
|
||
echo "unknown command: $cmd" | ||
exit 1 |
Oops, something went wrong.