mocmp
v1.4.4
Published
Motoko Compiler(mocmp) version manager
Downloads
9
Maintainers
Readme
Motoko Compiler(mocp) version manager
Quick Start
One-time initialization
npx mocp initSelect mocp version
npx mocmp
Use in GitHub workflows
Simply add this step
- name: Select mocp version
run: npx mocmp use 0.9.2Instead of 0.9.2 you can specify any other mocp version or latest
Setup
Install mocmp
npm i mocmp -gSet env var DFX_MOC_PATH
This command adds a line to .bashrc to set DFX_MOC_PATH to the current moc version
mocmp initOr you can add by yourself:
Run mocmp bin current, copy result and add the line below to your .bashrc
export DFX_MOC_PATH=<result>/mocUsage
Select mocp version
You will be prompted to select one of the available mocp versions
mocmpor
mocmp use 0.8.4or
mocmp use latestDone!
Now dfx will use current mocp version when you build canisters with dfx build or dfx deploy
Other use cases
If you want to use specific version of mocp to deploy a canister:
DFX_MOC_PATH=$(mocmp bin 0.8.3)/mocp dfx deploy my_canisterReset
Revert changes made by mocmp init
mocmp reset