mirror of
https://github.com/luxfi/sdk.git
synced 2026-10-30 15:19:23 +00:00
Lux Partners Limited is not the entity behind this work. Every place the old name stood — copyright lines, site footers, brand config, legal and compliance text — now names the company that actually holds it. lux.fund is the exception and is not renamed to match: that site belongs to Lux Assets Management LLC, a different company, and it says so. Two kinds of line were left for a person rather than rewritten. A dated news item recording that Lux Partners Limited was established in the Isle of Man is a historical fact, and renaming it would falsify the record. And a sentence asserting that the company is domiciled in the Isle of Man is a claim about a jurisdiction, not a name — an Inc or an LLC is not an Isle of Man company, so swapping the name there would assert something untrue. Co-authored-by: Hanzo Dev <[email protected]>
37 lines
1014 B
Bash
Executable File
37 lines
1014 B
Bash
Executable File
#!/usr/bin/env bash
|
|
# Copyright (C) 2023-2025, Lux Industries Inc. All rights reserved.
|
|
# See the file LICENSE for licensing terms.
|
|
|
|
set -e
|
|
|
|
|
|
if ! [[ "$0" =~ scripts/mock.gen.sh ]]; then
|
|
echo "must be run from repository root"
|
|
exit 255
|
|
fi
|
|
|
|
VMSDK_PATH=$(
|
|
cd "$(dirname "${BASH_SOURCE[0]}")"
|
|
cd .. && pwd
|
|
)
|
|
source "$VMSDK_PATH"/scripts/constants.sh
|
|
|
|
if ! command -v mockgen &> /dev/null
|
|
then
|
|
echo "mockgen not found, installing..."
|
|
# https://github.com/golang/mock
|
|
go install -v github.com/golang/mock/[email protected]
|
|
fi
|
|
|
|
# tuples of (source interface import path, comma-separated interface names, output file path)
|
|
input="scripts/mocks.mockgen.txt"
|
|
while IFS= read -r line
|
|
do
|
|
IFS='=' read src_import_path interface_name output_path <<< "${line}"
|
|
package_name=$(basename $(dirname $output_path))
|
|
echo "Generating ${output_path}..."
|
|
mockgen -copyright_file=./LICENSE.header -package=${package_name} -destination=${output_path} ${src_import_path} ${interface_name}
|
|
done < "$input"
|
|
|
|
echo "SUCCESS"
|