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

channels-1094-canary #2120

Merged
merged 2 commits into from
Jul 2, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 14 additions & 13 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,28 +12,29 @@
"node": "14 || ^18.12"
},
"scripts": {
"alpha": "lerna version prerelease --allow-branch $(git branch --show-current) --preid $(git branch --show-current) --no-push --no-git-tag-version",
"bootstrap": "lerna bootstrap",
"browser": "yarn workspace @segment/browser-destinations",
"cloud": "yarn workspace @segment/action-destinations",
"shared": "yarn workspace @segment/actions-shared",
"build": "nx run-many -t build && yarn build:browser-bundles",
"build:browser-bundles": "nx build @segment/destinations-manifest && nx build-web @segment/browser-destinations",
"canary": "./scripts/canary.sh",
"clean": "sh scripts/clean.sh",
"cli": "yarn workspace @segment/actions-cli",
"cli-internal": "yarn workspace @segment/actions-cli-internal",
"cloud": "yarn workspace @segment/action-destinations",
"core": "yarn workspace @segment/actions-core",
"bootstrap": "lerna bootstrap",
"build": "nx run-many -t build && yarn build:browser-bundles",
"build:browser-bundles": "nx build @segment/destinations-manifest && nx build-web @segment/browser-destinations",
"types": "./bin/run generate:types",
"validate": "./bin/run validate",
"lint": "ls -d ./packages/* | xargs -I {} eslint '{}/**/*.ts' --cache",
"postversion": "bash scripts/postversion.sh",
"prepare": "husky install",
"release": "bash scripts/release.sh",
"shared": "yarn workspace @segment/actions-shared",
"subscriptions": "yarn workspace @segment/destination-subscriptions",
"test": "nx run-many -t test",
"test-partners": "lerna run test --stream --ignore @segment/actions-core --ignore @segment/actions-cli --ignore @segment/ajv-human-errors",
"test-browser": "bash scripts/test-browser.sh",
"test-partners": "lerna run test --stream --ignore @segment/actions-core --ignore @segment/actions-cli --ignore @segment/ajv-human-errors",
"typecheck": "lerna run typecheck --stream",
"alpha": "lerna version prerelease --allow-branch $(git branch --show-current) --preid $(git branch --show-current) --no-push --no-git-tag-version",
"release": "bash scripts/release.sh",
"prepare": "husky install",
"postversion": "bash scripts/postversion.sh",
"clean": "sh scripts/clean.sh"
"types": "./bin/run generate:types",
"validate": "./bin/run validate"
},
"devDependencies": {
"@peculiar/webcrypto": "^1.2.3",
Expand Down
7 changes: 7 additions & 0 deletions scripts/canary.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#!/bin/bash

set -e

branch=$(git branch --show-current)
echo "Publishing canary release for branch: \"$branch\"."
npx lerna publish --canary --preid "$branch" --include-merged-tags
Comment on lines +6 to +7
Copy link
Contributor

Choose a reason for hiding this comment

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

The PR looks good. I am thinking about brining some package naming consistency between deploy-cloud-stage command and this one. We publish just core and destination-actions there to avoid publishing all the browser destinations while deploying to stage. The tag used there is next instead of canary and the preid includes short sha.

Do you think adding short sha to preid would be good idea? In the past, we have had trouble in getting lerna to publish again after a change.

Copy link
Contributor

Choose a reason for hiding this comment

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

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I'm not sure about the answer to either of these questions. The canary tag was pulled from some documentation I saw about deploying and testing changes in action-destinations.

Canary means that the release is not production ready right? Would next have the same value? What if someone else needed to use the next tag as well? As far as short SHA I'm open to change the script however you'd like.

Copy link
Contributor

Choose a reason for hiding this comment

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

As long as this works, its fine. Highly recommend using the new deploy-cloud-stage docs of actions-cli and would appreciate feedback on it.

Loading