Schedule (every 5 minutes) or push to main
branch.
With ENVIRONMENT=DEBUG
in environment, the script doesn't publish but outputs the commands that would be run. A publish is only triggered when ENVIRONMENT=PRODUCTION
is set.
Entry point to test development is npm run vsce:check <channel>
, where channel=dev|latest
.
- Defined in the file
.github/workflows/publish.yml
npm run vsce:check <channel>
is run twice with "dev" and "latest" as channels respectively. Internally, it callscheck-update.sh <channel>
Note the both dev
workflow and latest
workflow call the same scripts, the channel variable acts as a workflow discriminator as both workflows have slight differences, now we list the workflow steps in details:
npm run vsce:check dev
callscheck-update.sh dev
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.check-update.sh
comparesCURRENT_VERSION
(extension) againstNPM_VERSION
of Prisma CLI.- If they are same, this script exits
- If they are different,
bump.sh <channel> <version>
is called withchannel=dev
andversion=NPM_VERSION
(i.e. the new version of extension to publish) bump.sh
updates thepackage.json
files in root, client, server and setsname
,displayName
,version
,dependencies.@prisma/*
packages, andprisma.enginesVersion
values.check-update.sh
then commits these changes, this commit is required becausevsce publish
(to be run later requires a clean git state)npm run vsce:publish <channel> <version>
i.e.publish.sh <channel> <version>
is then called withchannel=dev
andversion=NPM_VERSION
(i.e. the new version of extension to publish). This command publishes the "Prisma Dev" extension.publish.sh
pushes to vscode main repo. Only changes from the dev channel are pushed.
npm run vsce:check latest
callscheck-update.sh latest
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.check-update.sh
comparesCURRENT_VERSION
(extension) againstNPM_VERSION
of Prisma CLI.- If they are same, this script exits
- If they are different,
bump.sh <channel> <version>
is called withchannel=latest
andversion=NPM_VERSION
(i.e. the new version of extension to publish) bump.sh
updates thepackage.json
files in root, client, server and setsname
,displayName
,version
,dependencies.@prisma/*
packages, andprisma.enginesVersion
values.check-update.sh
then commits these changes, this commit is required becausevsce publish
(to be run later requires a clean git state)npm run vsce:publish <channel> <version>
i.e.publish.sh <channel> <version>
is then called withchannel=latest
andversion=NPM_VERSION
(i.e. the new version of extension to publish). This command published the "Prisma" extension.