Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(dev): via a new Prisma Dev extension #109

Merged
merged 11 commits into from
Apr 24, 2020
Merged

feat(dev): via a new Prisma Dev extension #109

merged 11 commits into from
Apr 24, 2020

Conversation

divyenduz
Copy link

@divyenduz divyenduz commented Apr 22, 2020

Merging this should release a new "Prisma Dev" extension with name: prisma-dev, displayName: Prisma Dev

Divyendu Singh added 3 commits April 21, 2020 13:51
- Fixes #47
- Fixes #93

This PR is made against "alpha" and merging this should release a "new"
alpha extension.
- Remove the alpha branch dependency
- Push only when bumping alpha
- Bump @prisma/* packages when updating package.json
@divyenduz divyenduz added this to the Beta 4 milestone Apr 22, 2020
@divyenduz
Copy link
Author

divyenduz commented Apr 22, 2020

Pending:

  • Not committing at all from the latest job won't work as we use scripts/prisma-version file to know if we have published the extension for a Prisma version. Just having prisma-version for alpha will make the latest release job publish on loop. I will need to adjust this PR, probably by creating 2 files, scripts/prisma-version (at least this gets committed from latest) and scripts/prisma-version-alpha This can be replaced by using vsce show <publisher>.<extension-name> e.g. vsce show Prisma.prisma-alpha removing the need of this file, removing the stateful information from extension repo's version control.

  • The alpha channel code changes the extension name/displayName to use the alpha variants but the latest workflow must also change them back. This is needed since we don't plan to commit from the latest workflow anymore.

scripts/bump-sha.sh Outdated Show resolved Hide resolved
Co-Authored-By: Jan Piotrowski <[email protected]>
@divyenduz divyenduz requested a review from carmenberndt April 23, 2020 08:11
@divyenduz
Copy link
Author

divyenduz commented Apr 23, 2020

Next steps:

@divyenduz
Copy link
Author

divyenduz commented Apr 23, 2020

Merging this PR should release

  1. Extension Prisma with version 2.0.0-beta.3 (since it is being changed from 0.0.32).
  2. Extension Prisma Dev with version 2.0.0-alpha.1127 (latest alpha as of this comment) and commit the version etc to vscode repo master.

Next steps (probably in a separate PR):

  1. Release tags Add tag/release on publishing #73 - some spec needed re dev, latest channels
  2. Extension only release (TODO: Create GH issue)
  3. Adjust prisma-version.sh once we release dev channel for Prisma (TODO: Create GH issue)

@divyenduz divyenduz changed the title feat(alpha): via a new alpha extension feat(dev): via a new alpha extension Apr 23, 2020
@divyenduz divyenduz changed the title feat(dev): via a new alpha extension feat(dev): via a new Prisma Dev extension Apr 23, 2020
- rename to dev
- merge with master, adjust bump deps
- add release-workflow.md
@carmenberndt carmenberndt marked this pull request as ready for review April 23, 2020 10:14
Copy link
Contributor

@matthewmueller matthewmueller left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

release-workflow.md Outdated Show resolved Hide resolved
1. If they are different, `bump.sh <channel> <version>` is called with `channel=latest` and `version=NPM_VERSION` (i.e. the new version of extension to publish)
1. `bump.sh` updates the `package.json` files in root, client, server and sets `name`, `displayName`, `version`, `dependencies.@prisma/*` packages, and `prisma.version` values.
1. `check-update.sh` then commits these changes, this commit is required because `vsce publish` (to be run later requires a clean git state)
1. `yarn vsce:publish <channel> <version>` i.e. `publish.sh <channel> <version>` is then called with `channel=latest` and `version=NPM_VERSION` (i.e. the new version of extension to publish). This command published the "Prisma" extension.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
1. `yarn vsce:publish <channel> <version>` i.e. `publish.sh <channel> <version>` is then called with `channel=latest` and `version=NPM_VERSION` (i.e. the new version of extension to publish). This command published the "Prisma" extension.
1. `yarn vsce:publish <channel> <version>` i.e. `publish.sh <channel> <version>` is then called with `channel=latest` and `version=NPM_VERSION` (i.e. the new version of extension to publish). This command publishes the "Prisma" extension.

Comment on lines 20 to 40
### Dev workflow

1. `yarn vsce:check dev` calls `check-update.sh dev`
1. `check-update.sh` sets up the repo with Prismo bot as the user, all commits in the remainder of this workflow are attributed to Prismo.
1. `check-update.sh` compares `CURRENT_VERSION` (extension) against `NPM_VERSION` of Prisma CLI.
1. If they are same, this script exits
1. If they are different, `bump.sh <channel> <version>` is called with `channel=dev` and `version=NPM_VERSION` (i.e. the new version of extension to publish)
1. `bump.sh` updates the `package.json` files in root, client, server and sets `name`, `displayName`, `version`, `dependencies.@prisma/*` packages, and `prisma.version` values.
1. `check-update.sh` then commits these changes, this commit is required because `vsce publish` (to be run later requires a clean git state)
1. `yarn vsce:publish <channel> <version>` i.e. `publish.sh <channel> <version>` is then called with `channel=dev` and `version=NPM_VERSION` (i.e. the new version of extension to publish). This command published the "Prisma Dev" extension.
1. `publish.sh` pushes to vscode master repo. Only changes from the dev channel are pushed.

### Latest workflow

1. `yarn vsce:check latest` calls `check-update.sh latest`
1. `check-update.sh` sets up the repo with Prismo bot as the user, all commits in the remainder of this workflow are attributed to Prismo.
1. `check-update.sh` compares `CURRENT_VERSION` (extension) against `NPM_VERSION` of Prisma CLI.
1. If they are same, this script exits
1. If they are different, `bump.sh <channel> <version>` is called with `channel=latest` and `version=NPM_VERSION` (i.e. the new version of extension to publish)
1. `bump.sh` updates the `package.json` files in root, client, server and sets `name`, `displayName`, `version`, `dependencies.@prisma/*` packages, and `prisma.version` values.
1. `check-update.sh` then commits these changes, this commit is required because `vsce publish` (to be run later requires a clean git state)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

With the minimal difference we have here, these two lists can just be combined instead of duplicating everything, and the minimal differences are highlighted and made explicit.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Isn't it easier to read a specific workflow than both together?

1. If they are different, `bump.sh <channel> <version>` is called with `channel=latest` and `version=NPM_VERSION` (i.e. the new version of extension to publish)
1. `bump.sh` updates the `package.json` files in root, client, server and sets `name`, `displayName`, `version`, `dependencies.@prisma/*` packages, and `prisma.version` values.
1. `check-update.sh` then commits these changes, this commit is required because `vsce publish` (to be run later requires a clean git state)
1. `yarn vsce:publish <channel> <version>` i.e. `publish.sh <channel> <version>` is then called with `channel=latest` and `version=NPM_VERSION` (i.e. the new version of extension to publish). This command published the "Prisma" extension.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The names are hardcoded in here, based on the value of channel?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, we are in a specific workflow.

Co-Authored-By: Jan Piotrowski <[email protected]>
@divyenduz divyenduz merged commit 76c9b3d into master Apr 24, 2020
@divyenduz divyenduz deleted the feat_alpha branch April 24, 2020 08:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Use same versioning scheme & release cadence as Prisma itself alpha version of extension
4 participants