-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Document more moonlight developer stuff
- Loading branch information
Showing
2 changed files
with
71 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
--- | ||
title: Helper scripts | ||
sidebar: | ||
order: 3 | ||
--- | ||
|
||
Inside of the moonlight repository, there is a `scripts` folder with some tools in it. | ||
|
||
## update.js | ||
|
||
Updates the dependency with the given name in all packages. | ||
|
||
```shell title="Updating mappings" | ||
node ./scripts/update.js @moonlight-mod/mappings | ||
``` | ||
|
||
## link.js | ||
|
||
Links associated packages with pnpm temporarily. **Not recommended, may break your node_modules.** | ||
|
||
```shell title="Using and undoing link" | ||
node ./scripts/link.js | ||
node ./scripts/link.js --undo | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
--- | ||
title: Publishing a new release | ||
sidebar: | ||
order: 3 | ||
--- | ||
import { Aside } from "@astrojs/starlight/components"; | ||
|
||
<Aside>This page is mainly here for moonlight core developers who forget what they're doing. Normal users and contributors PRing do not have to do anything here.</Aside> | ||
<Aside type="caution">When publishing to npm, versions are constant. Exercise caution.</Aside> | ||
|
||
## Publishing moonlight | ||
|
||
moonlight CI builds the `develop` branch automatically. This section is for publishing a new stable, versioned release. | ||
|
||
- Checkout the `main` branch. | ||
- Merge `develop` into `main`. | ||
- Update the version in `package.json` and write `CHANGELOG.md`. | ||
- Do not append to the changelog - remake it. | ||
- If any types changes were made in this release, [publish the types](#publishing-types). | ||
- Commit and push to `main`. | ||
- Create a tag with the version, **starting with the character `v`**: `git tag vX.Y.Z` | ||
- This `v` is very important. CI will not pick it up otherwise. The installers will not know what to do without it. | ||
- Push the tag: `git push --tags` | ||
- Checkout the `develop` branch. | ||
- Merge `main` into `develop`. | ||
- Push to `develop`. | ||
|
||
## Publishing types | ||
|
||
- Update the version in `packages/types/package.json`. | ||
- The version of types does not need to be in sync with the version of moonlight. | ||
- Commit and push to `main`. | ||
- If releasing a stable build of moonlight, make sure the main version bump and types version bump are in the same commit. | ||
- Publish the package: `pnpm publish --access public` | ||
- Publish from within the `packages/types` directory. | ||
- In [the sample extension](https://github.com/moonlight-mod/sample-extension), update the types package: `pnpm update @moonlight-mod/types` | ||
- Commit and push to the sample extension. | ||
|
||
## Publishing LunAST/moonmap/mappings | ||
|
||
- Update package.json with a new version. | ||
- Commit and push to `main`. | ||
- Create a tag with the version, **starting with the character `v`**: `git tag vX.Y.Z` | ||
- Same reasoning as [above](#publishing-moonlight). | ||
- Push the tag: `git push --tags` | ||
- Wait for the package to be uploaded to npm. | ||
- Use [the update helper script](/dev/helper-scripts) to update the dependencies in moonlight. |