blob: bd0e17041058a529d8668685134e5084cc72e1cd [file] [log] [blame]
#!/bin/bash
# Copyright 2023 The Fuchsia Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
# Using a custom fetch script because repo has no tags (yet).
set -e
function usage() {
cat <<EOF
Usage: $0 [get_url|latest]
EOF
}
readonly _REPO="https://fuchsia.googlesource.com/third_party/github.com/bazelbuild/remote-apis-sdks"
# There are no release or tags.
# Manually bump these as needed:
readonly _COMMIT_ID="a15001f75e6ad524a427f89d28a6bc77968d1f3b"
readonly _REV=0
function get_url() {
# There are no releases to download.
# Grab a snapshot of the source.
cat <<EOF
{
"url": [ "$_REPO/archive/$_COMMIT_ID.zip" ],
"ext": ".zip"
}
EOF
}
function latest() {
# There is no version information.
echo "$_REV"
}
if [[ "$#" -lt 1 ]]; then
usage
exit 1
fi
subcommand="$1"
case "$subcommand" in
get_url ) get_url ;;
latest ) latest ;;
* ) usage ; exit 1;;
esac