-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
build: use nx for release version management (#239)
This PR integrates `nx` to manage the monorepo, at first only using it to manage the version evolution of the different packages in the monorepo, however, in the future we could leverage it to benefit from cached builds, tests, etc... I've create a `orbit-cli` package that upon calling `pnpm install` in the repo takes care of building it and making it available in the `PATH` env var, which then makes it possible to directly call `orbit-cli` from the terminal. After this PR the release process will need 2 steps: - First calling `orbit-cli release prepare`, this will evaluate if there is a need to bump versions based on the conventional commits available, once completed this will stage the changes and create a release commit that will also include a new file, the `.release.json` - Secondly, in a follow up PR, i'll introduce a workflow that when pushing to main it will trigger `orbit-cli release publish`, this command leverages the `.release.json` available and creates the necessary tags for the affected packages and will create the github release page automatically, this leverages `nx release` from the orbit-cli I've setup that all packages will evolve independently, but nx takes care of bumping the necessary versions when the package is a dependency in another. --------- Co-authored-by: olaszakos <[email protected]>
- Loading branch information
1 parent
de847e5
commit 9c0371a
Showing
40 changed files
with
3,514 additions
and
590 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 @@ | ||
* @dfinity/trust @mraszyk |
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 |
---|---|---|
|
@@ -69,3 +69,6 @@ wasms/*.wasm.gz | |
/src | ||
.canbench | ||
.canbench_output | ||
|
||
|
||
.nx/cache |
This file was deleted.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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
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
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,5 @@ | ||
{ | ||
"$schema": "../../node_modules/nx/schemas/project-schema.json", | ||
"name": "wallet-dapp", | ||
"projectType": "application" | ||
} |
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,16 @@ | ||
{ | ||
"name": "orbit-cli", | ||
"version": "0.0.1", | ||
"bin": { | ||
"orbit-cli": "./dist/cli.js" | ||
}, | ||
"main": "cli.js", | ||
"scripts": { | ||
"build": "tsc", | ||
"start": "node dist/cli.js", | ||
"expose": "pnpm link --global" | ||
}, | ||
"devDependencies": { | ||
"commander": "12.0.0" | ||
} | ||
} |
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,22 @@ | ||
import { program } from 'commander'; | ||
import { version } from '../package.json'; | ||
import release from './release'; | ||
|
||
program | ||
.storeOptionsAsProperties(false) | ||
.version(version) | ||
.name('orbit-cli') | ||
.description('The Orbit CLI includes tools for managing projects in the workspace') | ||
.command('path') | ||
.description('Print the path to the Orbit CLI') | ||
.action(() => console.log(__dirname)); | ||
|
||
program.addCommand(release); | ||
|
||
program | ||
.parseAsync() | ||
.then(() => process.exit(0)) | ||
.catch(error => { | ||
console.error(`The command failed with an error: ${error}`); | ||
process.exit(1); | ||
}); |
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,10 @@ | ||
import { createCommand } from 'commander'; | ||
import releasePrepare from './prepare'; | ||
import releasePublish from './publish'; | ||
|
||
const command = createCommand('release').description('Handle the release of projects'); | ||
|
||
command.addCommand(releasePrepare); | ||
command.addCommand(releasePublish); | ||
|
||
export default command; |
Oops, something went wrong.