This repository has been archived by the owner on Oct 9, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 23
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
10 changed files
with
667 additions
and
23 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 |
---|---|---|
@@ -0,0 +1,12 @@ | ||
module github.com/lyft/boilerplate | ||
|
||
go 1.13 | ||
|
||
require ( | ||
github.com/golangci/golangci-lint v1.22.2 | ||
github.com/lyft/flytestdlib v0.2.31 | ||
github.com/vektra/mockery v0.0.0-20181123154057-e78b021dcbb5 | ||
github.com/alvaroloes/enumer v1.1.2 | ||
) | ||
|
||
replace github.com/vektra/mockery => github.com/enghabu/mockery v0.0.0-20191009061720-9d0c8670c2f0 |
Large diffs are not rendered by default.
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,10 @@ | ||
// +build tools | ||
|
||
package tools | ||
|
||
import ( | ||
_ "github.com/golangci/golangci-lint/cmd/golangci-lint" | ||
_ "github.com/lyft/flytestdlib/cli/pflags" | ||
_ "github.com/vektra/mockery/cmd/mockery" | ||
_ "github.com/alvaroloes/enumer" | ||
) |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,8 @@ | ||
#!/usr/bin/env bash | ||
|
||
# WARNING: THIS FILE IS MANAGED IN THE 'BOILERPLATE' REPO AND COPIED TO OTHER REPOSITORIES. | ||
# ONLY EDIT THIS FILE FROM WITHIN THE 'LYFT/BOILERPLATE' REPOSITORY: | ||
# | ||
# TO OPT OUT OF UPDATES, SEE https://github.com/lyft/boilerplate/blob/master/Readme.rst | ||
|
||
goimports -w $(find . -type f -name '*.go' -not -path "./vendor/*" -not -path "./pkg/client/*") |
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,2 +1,3 @@ | ||
lyft/golang_test_targets | ||
lyft/golangci_file | ||
lyft/golang_support_tools |
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,54 @@ | ||
#!/usr/bin/env bash | ||
|
||
# WARNING: THIS FILE IS MANAGED IN THE 'BOILERPLATE' REPO AND COPIED TO OTHER REPOSITORIES. | ||
# ONLY EDIT THIS FILE FROM WITHIN THE 'LYFT/BOILERPLATE' REPOSITORY: | ||
# | ||
# TO OPT OUT OF UPDATES, SEE https://github.com/lyft/boilerplate/blob/master/Readme.rst | ||
|
||
set -e | ||
|
||
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null && pwd )" | ||
|
||
OUT="$(mktemp -d)" | ||
git clone [email protected]:lyft/boilerplate.git "${OUT}" | ||
|
||
echo "Updating the update.sh script." | ||
cp "${OUT}/boilerplate/update.sh" "${DIR}/update.sh" | ||
echo "" | ||
|
||
|
||
CONFIG_FILE="${DIR}/update.cfg" | ||
README="https://github.com/lyft/boilerplate/blob/master/Readme.rst" | ||
|
||
if [ ! -f "$CONFIG_FILE" ]; then | ||
echo "$CONFIG_FILE not found." | ||
echo "This file is required in order to select which features to include." | ||
echo "See $README for more details." | ||
exit 1 | ||
fi | ||
|
||
if [ -z "$REPOSITORY" ]; then | ||
echo '$REPOSITORY is required to run this script' | ||
echo "See $README for more details." | ||
exit 1 | ||
fi | ||
|
||
while read directory; do | ||
# TODO: Skip empty lines, whitespace only lines, and comment lines | ||
echo "***********************************************************************************" | ||
echo "$directory is configured in update.cfg." | ||
echo "-----------------------------------------------------------------------------------" | ||
echo "syncing files from source." | ||
dir_path="${OUT}/boilerplate/${directory}" | ||
rm -rf "${DIR}/${directory}" | ||
mkdir -p $(dirname "${DIR}/${directory}") | ||
cp -r "$dir_path" "${DIR}/${directory}" | ||
if [ -f "${DIR}/${directory}/update.sh" ]; then | ||
echo "executing ${DIR}/${directory}/update.sh" | ||
"${DIR}/${directory}/update.sh" | ||
fi | ||
echo "***********************************************************************************" | ||
echo "" | ||
done < "$CONFIG_FILE" | ||
|
||
rm -rf "${OUT}" |