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

Trigger changeset for next release #1207

Merged
merged 1 commit into from
Aug 9, 2023
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
1 change: 1 addition & 0 deletions .github/workflows/next-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ jobs:
git checkout -B next/${{ steps.version.outputs.NEXT_VERSION }}
# using changeset snapshot releases, this sets the version to 0.0.0-{tag}-DATETIMESTAMP where tag=next-SHORT_SHA
# as an example this results in a next release as following 0.0.0-next-1686a75-20230313113149 with a next tag
npm run version:next
npm run changeset -- version --snapshot ${{steps.version.outputs.NEXT_VERSION}}
npm run version:post
env:
Expand Down
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
"version:post": "npm run version:hydrogen && npm run version:cli",
"version:hydrogen": "node -p \"'export const LIB_VERSION = \\'' + require('./packages/hydrogen/package.json').version + '\\';'\" > packages/hydrogen/src/version.ts",
"version:cli": "cd packages/cli && npm run generate:manifest",
"version:next": "node scripts/changeset-version-next.mjs",
"changeset": "changeset",
"clean-all": "rimraf node_modules/.bin && rimraf node_modules/.cache && rimraf packages/*/dist && rimraf templates/*/.cache",
"check": "npm run build && npm run lint && npm run typecheck && npm run test"
Expand Down
23 changes: 23 additions & 0 deletions scripts/changeset-version-next.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
import path from 'path';
import fs from 'fs';
import {fileURLToPath} from 'url';

const CHANGESET_ALL = `---
'@shopify/hydrogen-react': patch
'demo-store': patch
'@shopify/hydrogen': patch
'@shopify/cli-hydrogen': patch
'@shopify/create-hydrogen': patch
'@shopify/hydrogen-codegen': patch
'@shopify/remix-oxygen': patch
---

Trigger changeset for all packages for next release
`;

(async () => {
const root = fileURLToPath(new URL('..', import.meta.url));
const changesetPath = path.resolve(root, '.changeset', 'trigger-patch-for-next-release.md');

await fs.writeFile(changesetPath, CHANGESET_ALL, () => {});
})();