Giter Site home page Giter Site logo

mocv's Introduction

Motoko Compiler(moc) version manager

Quick Start

One-time initialization

npx mocv init

Select moc version

npx mocv

Use in GitHub workflows

Simply add this step

- name: Select moc version
  run: npx mocv use 0.9.2

Instead of 0.9.2 you can specify any other moc version or latest

Setup

Install mocv

npm i mocv -g

Set env var DFX_MOC_PATH

This command adds a line to .bashrc to set DFX_MOC_PATH to the current moc version

mocv init

Or you can add by yourself:

Run mocv bin current, copy result and add the line below to your .bashrc

export DFX_MOC_PATH=<result>/moc

Usage

Select moc version

You will be prompted to select one of the available moc versions

mocv

or

mocv use 0.8.4

or

mocv use latest

Done!

Now dfx will use current moc version when you build canisters with dfx build or dfx deploy

Other use cases

If you want to use specific version of moc to deploy a canister:

DFX_MOC_PATH=$(mocv bin 0.8.3)/moc dfx deploy my_canister

Reset

Revert changes made by mocv init

mocv reset

mocv's People

Contributors

zenvoich avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

mocv's Issues

add zsh support

currently this only writes to .bashrc, ideally the current shell will be detected and the env variable written to the respective rc file

Master version

Hi ZenVoich,

Today came across your version manager, pretty good.

Can't stop being impressed with your good work.

I now will need to pull the latest version (master) of motoko. For development purposes.

There isn't any easy way yet to get it right?

Maybe it would be a good feature to add, would you consider?

Thanks,
Tiago

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.