|
@@ -3,7 +3,8 @@ WEBPACK := yarn build-acceptance
|
|
|
|
|
|
bootstrap: develop init-config run-dependent-services create-db apply-migrations build-platform-assets
|
|
|
|
|
|
-develop: ensure-pinned-pip setup-git install-js-dev install-py-dev
|
|
|
+develop:
|
|
|
+ @./scripts/do.sh develop
|
|
|
|
|
|
clean:
|
|
|
@echo "--> Cleaning static cache"
|
|
@@ -16,11 +17,11 @@ clean:
|
|
|
rm -rf build/ dist/ src/sentry/assets.json
|
|
|
@echo ""
|
|
|
|
|
|
-init-config: ensure-venv
|
|
|
- sentry init --dev
|
|
|
+init-config:
|
|
|
+ @./scripts/do.sh init-config
|
|
|
|
|
|
-run-dependent-services: ensure-venv
|
|
|
- sentry devservices up
|
|
|
+run-dependent-services:
|
|
|
+ @./scripts/do.sh run-dependent-services
|
|
|
|
|
|
DROPDB := $(shell command -v dropdb 2> /dev/null)
|
|
|
ifndef DROPDB
|
|
@@ -39,35 +40,22 @@ create-db:
|
|
|
@echo "--> Creating 'sentry' database"
|
|
|
$(CREATEDB) -h 127.0.0.1 -U postgres -E utf-8 sentry || true
|
|
|
|
|
|
-apply-migrations: ensure-venv
|
|
|
- @echo "--> Applying migrations"
|
|
|
- sentry upgrade
|
|
|
+apply-migrations:
|
|
|
+ @./scripts/do.sh apply-migrations
|
|
|
|
|
|
reset-db: drop-db create-db apply-migrations
|
|
|
|
|
|
setup-pyenv:
|
|
|
- ./scripts/pyenv_setup.sh
|
|
|
-
|
|
|
-ensure-venv:
|
|
|
- ./scripts/ensure-venv.sh
|
|
|
-
|
|
|
-ensure-pinned-pip: ensure-venv upgrade-pip
|
|
|
+ @./scripts/pyenv_setup.sh
|
|
|
|
|
|
upgrade-pip:
|
|
|
- ./scripts/python.sh upgrade-pip
|
|
|
+ @SENTRY_NO_VENV_CHECK=1 ./scripts/do.sh upgrade-pip
|
|
|
|
|
|
setup-git-config:
|
|
|
- @git config --local branch.autosetuprebase always
|
|
|
- @git config --local core.ignorecase false
|
|
|
- @git config --local blame.ignoreRevsFile .git-blame-ignore-revs
|
|
|
-
|
|
|
-setup-git: ensure-venv setup-git-config
|
|
|
- @echo "--> Installing git hooks"
|
|
|
- mkdir -p .git/hooks && cd .git/hooks && ln -sf ../../config/hooks/* ./
|
|
|
- @python3 -c '' || (echo 'Please run `make setup-pyenv` to install the required Python 3 version.'; exit 1)
|
|
|
- $(PIP) install -r requirements-pre-commit.txt
|
|
|
- @pre-commit install --install-hooks
|
|
|
- @echo ""
|
|
|
+ @SENTRY_NO_VENV_CHECK=1 ./scripts/do.sh setup-git-config
|
|
|
+
|
|
|
+setup-git:
|
|
|
+ @./scripts/do.sh setup-git
|
|
|
|
|
|
node-version-check:
|
|
|
@# Checks to see if node's version matches the one specified in package.json for Volta.
|
|
@@ -75,17 +63,10 @@ node-version-check:
|
|
|
(echo 'Unexpected node version. Recommended to use https://github.com/volta-cli/volta'; exit 1)
|
|
|
|
|
|
install-js-dev: node-version-check
|
|
|
- @echo "--> Installing Yarn packages (for development)"
|
|
|
- # Use NODE_ENV=development so that yarn installs both dependencies + devDependencies
|
|
|
- NODE_ENV=development yarn install --frozen-lockfile
|
|
|
- # A common problem is with node packages not existing in `node_modules` even though `yarn install`
|
|
|
- # says everything is up to date. Even though `yarn install` is run already, it doesn't take into
|
|
|
- # account the state of the current filesystem (it only checks .yarn-integrity).
|
|
|
- # Add an additional check against `node_modules`
|
|
|
- yarn check --verify-tree || yarn install --check-files
|
|
|
+ @./scripts/do.sh install-js-dev
|
|
|
|
|
|
install-py-dev:
|
|
|
- ./scripts/python.sh install-py-dev
|
|
|
+ @./scripts/do.sh install-py-dev
|
|
|
|
|
|
build-js-po: node-version-check
|
|
|
mkdir -p build
|
|
@@ -228,9 +209,6 @@ lint-js:
|
|
|
apply-migrations \
|
|
|
reset-db \
|
|
|
setup-pyenv \
|
|
|
- ensure-venv \
|
|
|
- ensure-pinned-pip \
|
|
|
- upgrade-pip \
|
|
|
setup-git-config \
|
|
|
setup-git \
|
|
|
node-version-check \
|