Skip to content

Commit

Permalink
chore: v0.7.2 (#442)
Browse files Browse the repository at this point in the history
* chore: v0.7.2

* chore: resources v0.7.2

* docs: v0.7.2

* misc: v0.7.2

* misc: script to deploy all examples

* misc: targets for publishing crates

* misc: remove old scripts

* misc: instructions for next steps

* misc: get Cargo.lock changes

* misc: update .PHONY

* misc: show usage
  • Loading branch information
chesedo authored Oct 28, 2022
1 parent 0968b72 commit b097d3b
Show file tree
Hide file tree
Showing 45 changed files with 195 additions and 200 deletions.
7 changes: 7 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -29,3 +29,10 @@ e2e/users.toml

.shuttle-*
docker-compose.rendered.yml

.env
node_modules/
package.json
yarn.lock

*.wasm
18 changes: 9 additions & 9 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

112 changes: 111 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ RUST_LOG?=debug

DOCKER_COMPOSE_ENV=STACK=$(STACK) BACKEND_TAG=$(TAG) PROVISIONER_TAG=$(TAG) POSTGRES_TAG=${POSTGRES_TAG} APPS_FQDN=$(APPS_FQDN) DB_FQDN=$(DB_FQDN) POSTGRES_PASSWORD=$(POSTGRES_PASSWORD) RUST_LOG=$(RUST_LOG) CONTAINER_REGISTRY=$(CONTAINER_REGISTRY) MONGO_INITDB_ROOT_USERNAME=$(MONGO_INITDB_ROOT_USERNAME) MONGO_INITDB_ROOT_PASSWORD=$(MONGO_INITDB_ROOT_PASSWORD)

.PHONY: images clean src up down deploy shuttle-% postgres docker-compose.rendered.yml test
.PHONY: images clean src up down deploy shuttle-% postgres docker-compose.rendered.yml test bump-% deploy-examples publish publish-% --validate-version

clean:
rm .shuttle-*
Expand Down Expand Up @@ -94,3 +94,113 @@ shuttle-%: ${SRC} Cargo.lock
$(BUILDX_FLAGS) \
-f Containerfile \
.

# Bunch of targets to make bumping the shuttle version easier
#
# Dependencies: git, cargo-edit, fastmod, ripgrep
# Usage: make bump-version current=0.6.3 version=0.7.0
bump-version: --validate-version
git checkout development
git fetch --all
git pull upstream
git checkout -b "chore/v$(version)"
cargo set-version --workspace "$(version)"

$(call next, bump-resources)

bump-resources:
git commit -m "chore: v$(version)"
fastmod --fixed-strings $(current) $(version) resources

$(call next, bump-examples)

bump-examples:
git commit -m "chore: resources v$(version)"
fastmod --fixed-strings $(current) $(version) examples

$(call next, bump-misc)

bump-misc:
git commit -m "docs: v$(version)"
fastmod --fixed-strings $(current) $(version)

$(call next, bump-final)

bump-final:
git commit -m "misc: v$(version)"
git push --set-upstream origin $$(git rev-parse --abbrev-ref HEAD)

echo "Make pull request and confirm everything is okay. Then run:"
echo "make publish"

# Deploy all our example using the command set in shuttle-command
# Usage: make deploy-example shuttle-command="cargo shuttle" -j 2
deploy-examples: deploy-examples/rocket/hello-world \
deploy-examples/rocket/persist \
deploy-examples/rocket/postgres \
deploy-examples/rocket/secrets \
deploy-examples/rocket/authentication \
deploy-examples/axum/hello-world \
deploy-examples/axum/websocket \
deploy-examples/poem/hello-world \
deploy-examples/poem/mongodb \
deploy-examples/poem/postgres \
deploy-examples/salvo/hello-world \
deploy-examples/tide/hello-world \
deploy-examples/tide/postgres \
deploy-examples/tower/hello-world \
deploy-examples/warp/hello-world \

echo "All example have been redeployed"

deploy-examples/%:
cd examples/$(*); $(shuttle-command) project rm || echo -e "\x1B[33m>> Nothing to remove for $*\x1B[39m"
sleep 5
cd examples/$(*); $(shuttle-command) project new
sleep 5
cd examples/$(*); $(shuttle-command) deploy

define next
cargo check # To update Cargo.lock
git add --all
git --no-pager diff --staged

echo -e "\x1B[36m>> Is this correct?\x1B[39m"
read yn; if [ $$yn != "y" ]; then echo "Fix the issues then continue with:"; echo "make version=$(version) current=$(current) $1"; exit 2; fi

make $1
endef

# Publish all our crates to crates.io
# See CONTRIBUTING.md for the dependency graph
# Usage: make publish -j 4
publish: publish-resources publish-cargo-shuttle
echo "The branch can now be safely merged"

publish-resources: publish-resources/aws-rds \
publish-resources/persist \
publish-resources/shared-db

publish-cargo-shuttle: publish-resources/secrets
cd cargo-shuttle; cargo publish
sleep 10 # Wait for crates.io to update

publish-service: publish-codegen publish-common
cd service; cargo publish
sleep 10 # Wait for crates.io to update

publish-codegen:
cd codegen; cargo publish
sleep 10 # Wait for crates.io to update

publish-common:
cd common; cargo publish
sleep 10 # Wait for crates.io to update

publish-resources/%: publish-service
cd resources/$(*); cargo publish
sleep 10 # Wait for crates.io to update

--validate-version:
echo "$(version)" | rg -q "\d+\.\d+\.\d+" || { echo "version argument must be in the form x.y.z"; exit 1; }
echo "$(current)" | rg -q "\d+\.\d+\.\d+" || { echo "current argument must be in the form x.y.z"; exit 1; }
8 changes: 4 additions & 4 deletions cargo-shuttle/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "cargo-shuttle"
version = "0.7.1"
version = "0.7.2"
edition = "2021"
license = "Apache-2.0"
description = "A cargo command for the shuttle platform (https://www.shuttle.rs/)"
Expand Down Expand Up @@ -43,15 +43,15 @@ uuid = { version = "1.1.2", features = ["v4"] }
webbrowser = "0.7.1"

[dependencies.shuttle-common]
version = "0.7.1"
version = "0.7.2"
path = "../common"

[dependencies.shuttle-secrets]
version = "0.7.1"
version = "0.7.2"
path = "../resources/secrets"

[dependencies.shuttle-service]
version = "0.7.1"
version = "0.7.2"
path = "../service"
features = ["loader"]

Expand Down
2 changes: 1 addition & 1 deletion cargo-shuttle/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ $ cargo shuttle init --rocket my-rocket-app

This should generate the following dependency in `Cargo.toml`:
```toml
shuttle-service = { version = "0.7.1", features = ["web-rocket"] }
shuttle-service = { version = "0.7.2", features = ["web-rocket"] }
```

The following boilerplate code should be generated into `src/lib.rs`:
Expand Down
2 changes: 1 addition & 1 deletion codegen/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "shuttle-codegen"
version = "0.7.1"
version = "0.7.2"
edition = "2021"
license = "Apache-2.0"
description = "Proc-macro code generator for the shuttle.rs service"
Expand Down
2 changes: 1 addition & 1 deletion common/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "shuttle-common"
version = "0.7.1"
version = "0.7.2"
edition = "2021"
license = "Apache-2.0"
description = "Common library for the shuttle platform (https://www.shuttle.rs/)"
Expand Down
8 changes: 4 additions & 4 deletions deployer/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "shuttle-deployer"
version = "0.7.1"
version = "0.7.2"
edition = "2021"
description = "Service with instances created per project for handling the compilation, loading, and execution of Shuttle services"

Expand Down Expand Up @@ -42,15 +42,15 @@ tracing-subscriber = { version = "0.3.11", features = ["env-filter"] }
uuid = { version = "1.1.2", features = ["v4"] }

[dependencies.shuttle-common]
version = "0.7.1"
version = "0.7.2"
path = "../common"

[dependencies.shuttle-proto]
version = "0.7.1"
version = "0.7.2"
path = "../proto"

[dependencies.shuttle-service]
version = "0.7.1"
version = "0.7.2"
path = "../service"
features = ["loader"]

Expand Down
2 changes: 1 addition & 1 deletion deployer/tests/deploy_layer/bind-panic/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,4 @@ crate-type = ["cdylib"]
[workspace]

[dependencies]
shuttle-service = "0.7.1"
shuttle-service = "0.7.2"
2 changes: 1 addition & 1 deletion deployer/tests/deploy_layer/main-panic/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,4 @@ crate-type = ["cdylib"]
[workspace]

[dependencies]
shuttle-service = "0.7.1"
shuttle-service = "0.7.2"
2 changes: 1 addition & 1 deletion deployer/tests/deploy_layer/self-stop/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,4 @@ crate-type = ["cdylib"]
[workspace]

[dependencies]
shuttle-service = "0.7.1"
shuttle-service = "0.7.2"
2 changes: 1 addition & 1 deletion deployer/tests/deploy_layer/sleep-async/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,4 @@ crate-type = ["cdylib"]

[dependencies]
tokio = { version = "1.0", features = ["time"]}
shuttle-service = "0.7.1"
shuttle-service = "0.7.2"
2 changes: 1 addition & 1 deletion examples/axum/hello-world/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,5 @@ edition = "2021"

[dependencies]
axum = "0.5"
shuttle-service = { version = "0.7.1", features = ["web-axum"] }
shuttle-service = { version = "0.7.2", features = ["web-axum"] }
sync_wrapper = "0.1"
2 changes: 1 addition & 1 deletion examples/axum/websocket/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,6 @@ hyper = { version = "0.14", features = ["client", "http2"] }
hyper-tls = "0.5"
serde = { version = "1.0", features = ["derive"] }
serde_json = "1.0"
shuttle-service = { version = "0.7.1", features = ["web-axum"] }
shuttle-service = { version = "0.7.2", features = ["web-axum"] }
sync_wrapper = "0.1"
tokio = { version = "1", features = ["full"] }
2 changes: 1 addition & 1 deletion examples/poem/hello-world/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,4 @@ edition = "2021"

[dependencies]
poem = "1.3.35"
shuttle-service = { version = "0.7.1", features = ["web-poem"] }
shuttle-service = { version = "0.7.2", features = ["web-poem"] }
4 changes: 2 additions & 2 deletions examples/poem/mongodb/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,5 @@ mongodb = "2.3.0"
poem = "1.3.35"
serde = { version = "1", features = ["derive"] }
serde_json = "1"
shuttle-service = { version = "0.7.1", features = ["web-poem"] }
shuttle-shared-db = { version = "0.7.1", features = ["mongodb"] }
shuttle-service = { version = "0.7.2", features = ["web-poem"] }
shuttle-shared-db = { version = "0.7.2", features = ["mongodb"] }
4 changes: 2 additions & 2 deletions examples/poem/postgres/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,6 @@ edition = "2021"
[dependencies]
poem = "1.3.35"
serde = "1.0"
shuttle-service = { version = "0.7.1", features = ["web-poem"] }
shuttle-shared-db = { version = "0.7.1", features = ["postgres"] }
shuttle-service = { version = "0.7.2", features = ["web-poem"] }
shuttle-shared-db = { version = "0.7.2", features = ["postgres"] }
sqlx = { version = "0.6", features = ["runtime-tokio-native-tls", "postgres"] }
2 changes: 1 addition & 1 deletion examples/rocket/authentication/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,4 @@ jsonwebtoken = { version = "8", default-features = false }
lazy_static = "1.4"
rocket = { version = "0.5.0-rc.2", features = ["json"] }
serde = { version = "1.0", features = ["derive"] }
shuttle-service = { version = "0.7.1", features = ["web-rocket"] }
shuttle-service = { version = "0.7.2", features = ["web-rocket"] }
2 changes: 1 addition & 1 deletion examples/rocket/hello-world/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,4 @@ edition = "2021"

[dependencies]
rocket = "0.5.0-rc.2"
shuttle-service = { version = "0.7.1", features = ["web-rocket"] }
shuttle-service = { version = "0.7.2", features = ["web-rocket"] }
4 changes: 2 additions & 2 deletions examples/rocket/persist/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,5 @@ edition = "2021"
[dependencies]
rocket = { version = "0.5.0-rc.1", features = ["json"] }
serde = { version = "1.0", features = ["derive"] }
shuttle-persist = "0.7.1"
shuttle-service = { version = "0.7.1", features = ["web-rocket"] }
shuttle-persist = "0.7.2"
shuttle-service = { version = "0.7.2", features = ["web-rocket"] }
4 changes: 2 additions & 2 deletions examples/rocket/postgres/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,6 @@ edition = "2021"
[dependencies]
rocket = { version = "0.5.0-rc.1", features = ["json"] }
serde = "1.0"
shuttle-service = { version = "0.7.1", features = ["web-rocket"] }
shuttle-shared-db = { version = "0.7.1", features = ["postgres"] }
shuttle-service = { version = "0.7.2", features = ["web-rocket"] }
shuttle-shared-db = { version = "0.7.2", features = ["postgres"] }
sqlx = { version = "0.6", features = ["runtime-tokio-native-tls", "postgres"] }
4 changes: 2 additions & 2 deletions examples/rocket/secrets/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,5 @@ edition = "2021"
[dependencies]
anyhow = "1.0.62"
rocket = { version = "0.5.0-rc.1", features = ["json"] }
shuttle-secrets = "0.7.1"
shuttle-service = { version = "0.7.1", features = ["web-rocket"] }
shuttle-secrets = "0.7.2"
shuttle-service = { version = "0.7.2", features = ["web-rocket"] }
Loading

0 comments on commit b097d3b

Please sign in to comment.