Skip to content

Commit

Permalink
fix: release and jitsu-cli login
Browse files Browse the repository at this point in the history
  • Loading branch information
vklimontovich committed Jan 8, 2024
1 parent 34e3b67 commit 8eb9fba
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 10 deletions.
10 changes: 5 additions & 5 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,15 +30,15 @@ always release them together, even if only one of them has changes.

## Canary releases

- `pnpm exec monorel --filter '@jitsu/js' --filter '@jitsu/jitsu-react' --filter '@jitsu/protocols' --version '1.1.0-canary.{rev}.{time}' --npm-tag canary` - to **dry-run** publishing
- Same command, but with `--publish` - to **publish**.
- `pnpm release:canary` - to **dry-run** publishing
- Same command, but with `pnpm release:canary --publish` - to **publish**.

> **Note**
> Replace `1.1.0` in `--version '1.1.0-canary.{rev}'` to the version that makes sense

## Stable releases

- `pnpm exec monorel --filter '@jitsu/js' --filter '@jitsu/jitsu-react' --filter '@jitsu/protocols' --version '**<put new version>**' --npm-tag latest` - to **dry-run** publishing
- `pnpm release --version <put a version here>` - to **dry-run** publishing
- Same command, but with `--publish` - to **publish**.




15 changes: 12 additions & 3 deletions cli/jitsu-cli/src/commands/login.ts
Original file line number Diff line number Diff line change
Expand Up @@ -68,11 +68,20 @@ export async function login({ host, apikey, force }: { host: string; apikey?: st
const c = randomId(32);
const server = app.listen(0, async () => {
const addr = server.address() as any;
const r = await open(`${url}?origin=${origin}&c=${c}&redirect=http://localhost:${addr.port}/`);
let openCode: number | null = null;
try {
const r = await open(`${url}?origin=${origin}&c=${c}&redirect=http://localhost:${addr.port}/`);
openCode = r.exitCode;
} catch (e) {
console.error(
`Failed to open a browser window. Please open this url in your browser:\n${url}?origin=${origin}&c=${c}`
);
}

const int = setInterval(() => {
if (r.exitCode !== null) {
if (openCode !== null) {
clearInterval(int);
if (r.exitCode !== 0) {
if (openCode !== 0) {
console.log(`Please open this url in your browser:\n${url}?origin=${origin}&c=${c}`);
const rl = readline.createInterface({
input: process.stdin,
Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@
"factory-reset": "pnpm clean ; pnpm clean:turbo ; rm -rf `find . -type d -name node_modules`",
"clean": "turbo run clean || exit 0",
"lint": "turbo run lint --",
"release": "monorel --filter ./types/protocols --filter ./cli/jitsu-cli --filter ./libs/functions --filter ./libs/jitsu-js --filter ./libs/jitsu-react --npm-tag latest",
"release:canary": "monorel --filter ./types/protocols --filter ./cli/jitsu-cli --filter ./libs/functions --filter ./libs/jitsu-js --filter ./libs/jitsu-react --version '1.7.1-canary.{rev}.{time}' --npm-tag canary --git-tag 'canary-v{version}' --push-tag --publish"
"release": "pnpm build && pnpm test && monorel --filter ./types/protocols --filter ./cli/jitsu-cli --filter ./libs/functions --filter ./libs/jitsu-js --filter ./libs/jitsu-react --npm-tag latest --git-tag 'jitsu-js-libs-v{version}' --push-tag",
"release:canary": "monorel --filter ./types/protocols --filter ./cli/jitsu-cli --filter ./libs/functions --filter ./libs/jitsu-js --filter ./libs/jitsu-react --version '1.9.0-canary.{rev}.{time}' --npm-tag canary --git-tag 'jitsu-js-libs-canary-v{version}' --push-tag"
},
"devDependencies": {
"@playwright/test": "1.39.0",
Expand Down

2 comments on commit 8eb9fba

@vercel
Copy link

@vercel vercel bot commented on 8eb9fba Jan 8, 2024

Choose a reason for hiding this comment

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

Successfully deployed to the following URLs:

new-jitsu-ee-api – ./webapps/ee-api

onetag-ee-api.vercel.app
new-jitsu-ee-api-jitsu.vercel.app
new-jitsu-ee-api-git-newjitsu-jitsu.vercel.app
ee.jitsu.dev

@vercel
Copy link

@vercel vercel bot commented on 8eb9fba Jan 8, 2024

Choose a reason for hiding this comment

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

Successfully deployed to the following URLs:

new-jitsu – ./webapps/console

new-jitsu-git-newjitsu-jitsu.vercel.app
use.jitsu.com
new-jitsu-jitsu.vercel.app

Please sign in to comment.