corso/src/Makefile
Abin Simon 3f88ee4f44
Update gci cli args in Makefile (#4621)
Looks like newer version of gci cli has changed the way to pass cli args.

<!-- PR description-->

---

#### Does this PR need a docs update or release note?

- [ ]  Yes, it's included
- [ ] 🕐 Yes, but in a later PR
- [x]  No

#### Type of change

<!--- Please check the type of change your PR introduces: --->
- [ ] 🌻 Feature
- [ ] 🐛 Bugfix
- [ ] 🗺️ Documentation
- [ ] 🤖 Supportability/Tests
- [ ] 💻 CI/Deployment
- [ ] 🧹 Tech Debt/Cleanup

#### Issue(s)

<!-- Can reference multiple issues. Use one of the following "magic words" - "closes, fixes" to auto-close the Github issue. -->
* #<issue>

#### Test Plan

<!-- How will this be tested prior to merging.-->
- [ ] 💪 Manual
- [ ]  Unit test
- [ ] 💚 E2E
2023-11-08 16:46:39 +00:00

86 lines
1.8 KiB
Makefile

# This must match the version defined in .github/workflows/lint.yaml.
WANTED_LINT_VERSION := 1.54.2
LINT_VERSION := $(shell golangci-lint version | cut -d' ' -f4)
HAS_LINT := $(shell which golangci-lint)
INSTALL_LINT_PAGE := "https://golangci-lint.run/usage/install/"
BAD_LINT_MSG := "Missing golangci-lint version $(WANTED_LINT_VERSION). Visit $(INSTALL_LINT_PAGE) for instructions on how to install"
.PHONY: check-lint check-lint-version lint load-test
build:
go build -o corso
lint: check-lint-version
golangci-lint run
staticcheck ./...
fmt:
gofumpt -w .
goimports -w .
gci write --skip-generated -s 'standard' -s 'default' -s 'prefix(github.com/alcionai/corso)' .
check-lint-version: check-lint
@if [ "$(LINT_VERSION)" != "$(WANTED_LINT_VERSION)" ]; then \
echo >&2 $(BAD_LINT_MSG); \
false; \
fi
check-lint:
@if [ -z "$(HAS_LINT)" ]; then \
echo >&2 $(BAD_LINT_MSG); \
false; \
fi
build-otel-daemon:
cd testfiles/otel_daemon; \
docker build -t xray-daemon .
otel-daemon:
results_dir=$$PWD/testlog; \
cd ./testfiles/otel_daemon; \
docker run \
-d \
-e AWS_REGION \
-v ~/.aws/:/root/.aws/:ro \
--name otel-daemon \
-p 2000:2000/udp \
--rm \
xray-daemon \
--local-mode \
--log-level debug
local-daemon:
results_dir=$$PWD/testlog; \
cd ./testfiles/otel_daemon; \
docker run \
--attach STDOUT \
-e AWS_REGION \
-v ~/.aws/:/root/.aws/:ro \
--name otel-daemon \
-p 2000:2000/udp \
--rm \
xray-daemon \
--local-mode \
--log-level debug
# --net=host \
load-test:
AWS_XRAY_NOOP_ID=False \
CORSO_LOAD_TESTS=y \
go test \
-v \
-count=1 \
-timeout 1h \
-blockprofile=block.prof \
-cpuprofile=cpu.prof \
-memprofile=mem.prof \
-mutexprofile=mutex.prof \
-trace=trace.out \
-outputdir=testlog \
./pkg/repository/loadtest/repository_load_test.go
getM365:
go build -o getM365 cmd/getM365/main.go