Skip to content

Commit be937a3

Browse files
committed
fix: download-release.sh automatically gets latest
1 parent 4a95e81 commit be937a3

File tree

2 files changed

+12
-2
lines changed

2 files changed

+12
-2
lines changed

Makefile

+1
Original file line numberDiff line numberDiff line change
@@ -124,6 +124,7 @@ config.oneshot.json: config.json
124124
jq '.extraModules += ["Oneshot"]' < config.json > config.oneshot.json
125125

126126
Outputs/src/oneshot/Oneshot/Main.lean: Oneshot/lean3-in/main.ast.json Oneshot/lean4-in/build/lib/Oneshot.trace config.oneshot.json
127+
mkdir -p Logs/
127128
./build/bin/mathport config.oneshot.json Oneshot::main >> Logs/oneshot.out 2> >(tee -a Logs/oneshot.err >&2)
128129

129130
oneshot: Outputs/src/oneshot/Oneshot/Main.lean

download-release.sh

+11-2
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,19 @@
22
# Script to download artifacts from a release.
33
# Usage: `./download-release.sh nightly-2021-11-30`
44

5-
RELEASE=$1 # e.g. nightly-2021-11-30
5+
if [ -z ${1+x} ]; then
6+
RELEASE=`
7+
curl -H "Accept: application/vnd.github+json" -H "X-GitHub-Api-Version: 2022-11-28" \
8+
https://api.github.com/repos/leanprover-community/mathport/releases \
9+
| jq 'last([.[].tag_name | select(startswith("nightly-"))] | sort | .[])' -r
10+
`
11+
else
12+
RELEASE=$1 # e.g. nightly-2021-11-30
13+
fi
14+
echo "getting release $RELEASE"
615

716
if [ -z "$RELEASE" ]; then
8-
echo "Usage: ./download-release.sh nightly-YYYY-MM-DD"
17+
echo "Usage: ./download-release.sh [nightly-YYYY-MM-DD]"
918
echo "See https://github.com/leanprover-community/mathport/releases for available releases"
1019
exit 1
1120
fi

0 commit comments

Comments
 (0)