-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #19 from disneystreaming/dfrancoeur/proto-index
Tweak protoIndex validation to check union member
- Loading branch information
Showing
8 changed files
with
309 additions
and
47 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 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 |
---|---|---|
@@ -1 +1 @@ | ||
0.10.7 | ||
0.10.9 |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
#!/usr/bin/env sh | ||
|
||
# This is a wrapper script, that automatically download mill from GitHub release pages | ||
# You can give the required mill version with MILL_VERSION env variable | ||
# If no version is given, it falls back to the value of DEFAULT_MILL_VERSION | ||
DEFAULT_MILL_VERSION=0.10.9 | ||
|
||
set -e | ||
|
||
if [ -z "$MILL_VERSION" ] ; then | ||
if [ -f ".mill-version" ] ; then | ||
MILL_VERSION="$(head -n 1 .mill-version 2> /dev/null)" | ||
elif [ -f ".config/mill-version" ] ; then | ||
MILL_VERSION="$(head -n 1 .config/mill-version 2> /dev/null)" | ||
elif [ -f "mill" ] && [ "$0" != "mill" ] ; then | ||
MILL_VERSION=$(grep -F "DEFAULT_MILL_VERSION=" "mill" | head -n 1 | cut -d= -f2) | ||
else | ||
MILL_VERSION=$DEFAULT_MILL_VERSION | ||
fi | ||
fi | ||
|
||
if [ "x${XDG_CACHE_HOME}" != "x" ] ; then | ||
MILL_DOWNLOAD_PATH="${XDG_CACHE_HOME}/mill/download" | ||
else | ||
MILL_DOWNLOAD_PATH="${HOME}/.cache/mill/download" | ||
fi | ||
MILL_EXEC_PATH="${MILL_DOWNLOAD_PATH}/${MILL_VERSION}" | ||
|
||
version_remainder="$MILL_VERSION" | ||
MILL_MAJOR_VERSION="${version_remainder%%.*}"; version_remainder="${version_remainder#*.}" | ||
MILL_MINOR_VERSION="${version_remainder%%.*}"; version_remainder="${version_remainder#*.}" | ||
|
||
if [ ! -s "$MILL_EXEC_PATH" ] ; then | ||
mkdir -p "$MILL_DOWNLOAD_PATH" | ||
if [ "$MILL_MAJOR_VERSION" -gt 0 ] || [ "$MILL_MINOR_VERSION" -ge 5 ] ; then | ||
ASSEMBLY="-assembly" | ||
fi | ||
DOWNLOAD_FILE=$MILL_EXEC_PATH-tmp-download | ||
MILL_VERSION_TAG=$(echo $MILL_VERSION | sed -E 's/([^-]+)(-M[0-9]+)?(-.*)?/\1\2/') | ||
MILL_DOWNLOAD_URL="https://github.com/lihaoyi/mill/releases/download/${MILL_VERSION_TAG}/$MILL_VERSION${ASSEMBLY}" | ||
curl --fail -L -o "$DOWNLOAD_FILE" "$MILL_DOWNLOAD_URL" | ||
chmod +x "$DOWNLOAD_FILE" | ||
mv "$DOWNLOAD_FILE" "$MILL_EXEC_PATH" | ||
unset DOWNLOAD_FILE | ||
unset MILL_DOWNLOAD_URL | ||
fi | ||
|
||
if [ -z "$MILL_MAIN_CLI" ] ; then | ||
MILL_MAIN_CLI="${0}" | ||
fi | ||
|
||
unset MILL_DOWNLOAD_PATH | ||
unset MILL_VERSION | ||
|
||
exec $MILL_EXEC_PATH -D "mill.main.cli=${MILL_MAIN_CLI}" "$@" |
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
Oops, something went wrong.