mirror of
https://github.com/sqlfluff/sqlfluff
synced 2025-12-17 19:31:32 +00:00
Streamline release commands (#7005)
This commit is contained in:
@@ -337,13 +337,12 @@ need a [GitHub Personal Access Token](https://docs.github.com/en/authentication/
|
||||
scope, and read permissions on the "Metadata" scope. The reason we need
|
||||
both read & write access on the "Content" scope is that only tokens with
|
||||
write access can see _draft_ releases, which is what we need access to).
|
||||
All maintainers should have sufficient access to generate such a token:
|
||||
All maintainers should have sufficient access to generate such a token. Once
|
||||
generated, store it in your env (zshrc, etc) as `SQLFLUFF_GITHUB_TOKEN`. Then:
|
||||
|
||||
```shell
|
||||
source .venv/bin/activate
|
||||
export GITHUB_REPOSITORY_OWNER=sqlfluff
|
||||
export GITHUB_TOKEN=gho_xxxxxxxx # Change to your token with "repo" permissions.
|
||||
python util.py release 2.0.3 # Change to your release number
|
||||
make shell
|
||||
make release 3.4.2 # Change to your release number
|
||||
```
|
||||
|
||||
When all of the changes planned for the release have been merged, and
|
||||
|
||||
12
Makefile
12
Makefile
@@ -1,7 +1,14 @@
|
||||
.PHONY: help build clean fresh shell start stop
|
||||
.PHONY: help build clean fresh release shell start stop
|
||||
|
||||
.DEFAULT_GOAL := help
|
||||
|
||||
# Set VERSION from first argument if provided
|
||||
VERSION := $(word 2,$(filter-out $(.DEFAULT_GOAL),$(MAKECMDGOALS)))
|
||||
|
||||
# Treat flow name as a target (prevents make errors)
|
||||
$(VERSION):
|
||||
@:
|
||||
|
||||
help: ## Show this available targets
|
||||
@grep -E '^[/a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) | sort | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-20s\033[0m %s\n", $$1, $$2}'
|
||||
|
||||
@@ -16,6 +23,9 @@ clean: ## Clean up all containers and images
|
||||
fresh: ## Build the development container from scratch
|
||||
docker-compose build --no-cache development
|
||||
|
||||
release: ## Release a new version
|
||||
@python util.py release $(VERSION)
|
||||
|
||||
shell: ## Start a bash session in the development container
|
||||
docker-compose exec development bash
|
||||
|
||||
|
||||
@@ -4,8 +4,10 @@ services:
|
||||
context: .
|
||||
dockerfile: ./docker/development/Dockerfile
|
||||
environment:
|
||||
- SSH_AUTH_SOCK=/ssh-agent
|
||||
- GITHUB_REPOSITORY_OWNER=sqlfluff
|
||||
- GITHUB_TOKEN=${SQLFLUFF_GITHUB_TOKEN}
|
||||
- POSTGRES_HOST=postgres
|
||||
- SSH_AUTH_SOCK=/ssh-agent
|
||||
volumes:
|
||||
- .:/app
|
||||
- ./test/fixtures/dbt/profiles_yml:/root/.dbt
|
||||
|
||||
Reference in New Issue
Block a user