Merge branch 'dev' into feature/dry-run-bin

This commit is contained in:
Galfour 2019-06-12 20:02:39 +00:00
commit 8f03e537cd
48 changed files with 756 additions and 198 deletions

1
.gitignore vendored
View File

@ -2,3 +2,4 @@
/dune-project
*~
cache/*
Version.ml

View File

@ -8,6 +8,20 @@ stages:
- build_and_deploy_website
- test
.website_build: &website_build
stage: build_and_deploy_website
image: node:8
before_script:
- cd gitlab-pages/website
- npm install
script:
- npm run version next
- npm run build
after_script:
- cp -r gitlab-pages/website/build/ligo public
artifacts:
paths:
- public
.docker: &docker
image: docker:1.11
@ -16,7 +30,7 @@ stages:
.docker_build: &docker_build
script:
- docker build -t $LIGO_REGISTRY_IMAGE:latest -f ./docker/Dockerfile .
- docker build -t $LIGO_REGISTRY_IMAGE:next -f ./docker/Dockerfile .
.before_script: &before_script
before_script:
@ -90,8 +104,9 @@ build-current-docker-image:
<<: *docker_build
except:
- master
- dev
# When a MR/PR is merged to master
# When a MR/PR is merged to dev
# take the previous build and publish it to Docker Hub
build-and-publish-latest-docker-image:
stage: build_and_deploy_docker
@ -99,25 +114,16 @@ build-and-publish-latest-docker-image:
<<: *docker_build
after_script:
- docker login -u $LIGO_REGISTRY_USER -p $LIGO_REGISTRY_PASSWORD
- docker push $LIGO_REGISTRY_IMAGE:latest
- docker push $LIGO_REGISTRY_IMAGE:next
only:
- master
- dev
# Pages are deployed from both master & dev, be careful not to override 'next'
# in case something gets merged into 'dev' while releasing.
pages:
stage: build_and_deploy_website
image: node:8
before_script:
- cd gitlab-pages/website
- npm install
script:
- npm run build
- pwd
- cd ../..
- pwd
- cp -r gitlab-pages/website/build/ligo public
artifacts:
paths:
- public
<<: *website_build
only:
- master
- dev

View File

@ -10,3 +10,5 @@ website/build/
website/yarn.lock
website/node_modules
website/i18n/*
website/versioned_docs/version-next
website/versioned_sidebars/version-next-sidebars.json

View File

@ -1,2 +0,0 @@
up:
docker-compose up

View File

@ -13,6 +13,9 @@ services:
- ./website/i18n:/app/website/i18n
- ./website/pages:/app/website/pages
- ./website/static:/app/website/static
- ./website/versioned_sidebars:/app/website/versioned_sidebars
- ./website/versioned_docs:/app/website/versioned_docs
- ./website/sidebars.json:/app/website/sidebars.json
- ./website/siteConfig.js:/app/website/siteConfig.js
- ./website/versions.json:/app/website/versions.json
working_dir: /app/website

View File

@ -0,0 +1,20 @@
---
id: documentation-and-releases
title: Documentation and releases
---
## Documentation
In case you'd like to contribute to the docs, you can find them at [`gitlab-pages/docs`]() in their raw markdown form.
Deployment of the docs/website for LIGO is taken care of within the CI, from `dev` and `master` branches.
## Releases & versioning
### Development releases (next)
Development releases of Ligo are tagged as `next` and are built with each commit to the `dev` branch. Both the docker image & the website are published automatically.
### Stable releases
Releases tagged with version numbers `x.x.x` are built manually, both docs & the docker image. While deployment of the website is handled by the CI.

View File

@ -5,22 +5,24 @@ title: Installation
There are currently two ways to get started with Ligo, both of those will allow you to use the Ligo CLI with your contracts. You can choose to use either the Docker image, or to compile & build the Ligo CLI yourself.
## Docker
## Dockerized installation (recommended)
> 🐳 You can find instructions on how to install Docker [here](https://docs.docker.com/install/).
Easiest way to use LIGO is through the Docker image available at [Docker Hub](https://hub.docker.com/r/stovelabs/granary-ligo). Sources for the image can be found on [Github](https://github.com/stove-labs/granary/blob/develop/docker/ligo/Dockerfile).
Easiest way to use LIGO is through the Docker image available at [Docker Hub](https://hub.docker.com/r/ligolang/ligo). Sources for the image can be found on [Gitlab](https://gitlab.com/ligolang/ligo/blob/master/docker/Dockerfile).
You can either run the docker image yourself, or you can setup a global ligo executable as shown below.
### Setting up a globally available `ligo` executable
```zsh
wget https://gitlab.com/maht0rz/ligo-documentation/blob/master/ligo-docker.sh && \
sudo cp ligo-docker.sh /usr/local/bin/ligo && \
sudo chmod +x /usr/local/bin/ligo && \
rm ligo-docker.sh
```
> ⚠️ Please note that the **current docker image is quite chunky**, it may take a while to download depending on your internet connection.
> You can install additional ligo versions by replacing `next` with the required version number
```zsh
# next (pre-release)
curl https://gitlab.com/ligolang/ligo/raw/dev/scripts/installer.sh | bash -s "next"
# e.g. 1.0.0 (stable)
curl https://gitlab.com/ligolang/ligo/raw/master/scripts/installer.sh | bash -s "1.0.0"
```
**Verify your ligo installation by running:**
```zsh
@ -28,9 +30,9 @@ ligo --help
```
## Manual installation
## Manual installation (advanced)
For now, please refer to the steps described in the [Dockerfile](https://github.com/stove-labs/granary/blob/develop/docker/ligo/Dockerfile).
For now, please refer to the steps described in the [Dockerfile](https://gitlab.com/ligolang/ligo/blob/master/docker/Dockerfile).

View File

@ -0,0 +1,6 @@
---
id: first-smart-contract
title: My first LIGO smart contract
---
TODO

View File

@ -1,18 +0,0 @@
---
title: Blog Title
author: Blog Author
authorURL: http://twitter.com/
authorFBID: 100002976521003
---
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Pellentesque elementum dignissim ultricies. Fusce rhoncus ipsum tempor eros aliquam consequat. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Vivamus elementum massa eget nulla aliquet sagittis. Proin odio tortor, vulputate ut odio in, ultrices ultricies augue. Cras ornare ultrices lorem malesuada iaculis. Etiam sit amet libero tempor, pulvinar mauris sed, sollicitudin sapien.
<!--truncate-->
Mauris vestibulum ullamcorper nibh, ut semper purus pulvinar ut. Donec volutpat orci sit amet mauris malesuada, non pulvinar augue aliquam. Vestibulum ultricies at urna ut suscipit. Morbi iaculis, erat at imperdiet semper, ipsum nulla sodales erat, eget tincidunt justo dui quis justo. Pellentesque dictum bibendum diam at aliquet. Sed pulvinar, dolor quis finibus ornare, eros odio facilisis erat, eu rhoncus nunc dui sed ex. Nunc gravida dui massa, sed ornare arcu tincidunt sit amet. Maecenas efficitur sapien neque, a laoreet libero feugiat ut.
Nulla facilisi. Maecenas sodales nec purus eget posuere. Sed sapien quam, pretium a risus in, porttitor dapibus erat. Sed sit amet fringilla ipsum, eget iaculis augue. Integer sollicitudin tortor quis ultricies aliquam. Suspendisse fringilla nunc in tellus cursus, at placerat tellus scelerisque. Sed tempus elit a sollicitudin rhoncus. Nulla facilisi. Morbi nec dolor dolor. Orci varius natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Cras et aliquet lectus. Pellentesque sit amet eros nisi. Quisque ac sapien in sapien congue accumsan. Nullam in posuere ante. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae; Proin lacinia leo a nibh fringilla pharetra.
Orci varius natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Proin venenatis lectus dui, vel ultrices ante bibendum hendrerit. Aenean egestas feugiat dui id hendrerit. Orci varius natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Curabitur in tellus laoreet, eleifend nunc id, viverra leo. Proin vulputate non dolor vel vulputate. Curabitur pretium lobortis felis, sit amet finibus lorem suscipit ut. Sed non mollis risus. Duis sagittis, mi in euismod tincidunt, nunc mauris vestibulum urna, at euismod est elit quis erat. Phasellus accumsan vitae neque eu placerat. In elementum arcu nec tellus imperdiet, eget maximus nulla sodales. Curabitur eu sapien eget nisl sodales fermentum.
Phasellus pulvinar ex id commodo imperdiet. Praesent odio nibh, sollicitudin sit amet faucibus id, placerat at metus. Donec vitae eros vitae tortor hendrerit finibus. Interdum et malesuada fames ac ante ipsum primis in faucibus. Quisque vitae purus dolor. Duis suscipit ac nulla et finibus. Phasellus ac sem sed dui dictum gravida. Phasellus eleifend vestibulum facilisis. Integer pharetra nec enim vitae mattis. Duis auctor, lectus quis condimentum bibendum, nunc dolor aliquam massa, id bibendum orci velit quis magna. Ut volutpat nulla nunc, sed interdum magna condimentum non. Sed urna metus, scelerisque vitae consectetur a, feugiat quis magna. Donec dignissim ornare nisl, eget tempor risus malesuada quis.

View File

@ -1,18 +0,0 @@
---
title: New Blog Post
author: Blog Author
authorURL: http://twitter.com/
authorFBID: 100002976521003
---
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Pellentesque elementum dignissim ultricies. Fusce rhoncus ipsum tempor eros aliquam consequat. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Vivamus elementum massa eget nulla aliquet sagittis. Proin odio tortor, vulputate ut odio in, ultrices ultricies augue. Cras ornare ultrices lorem malesuada iaculis. Etiam sit amet libero tempor, pulvinar mauris sed, sollicitudin sapien.
<!--truncate-->
Mauris vestibulum ullamcorper nibh, ut semper purus pulvinar ut. Donec volutpat orci sit amet mauris malesuada, non pulvinar augue aliquam. Vestibulum ultricies at urna ut suscipit. Morbi iaculis, erat at imperdiet semper, ipsum nulla sodales erat, eget tincidunt justo dui quis justo. Pellentesque dictum bibendum diam at aliquet. Sed pulvinar, dolor quis finibus ornare, eros odio facilisis erat, eu rhoncus nunc dui sed ex. Nunc gravida dui massa, sed ornare arcu tincidunt sit amet. Maecenas efficitur sapien neque, a laoreet libero feugiat ut.
Nulla facilisi. Maecenas sodales nec purus eget posuere. Sed sapien quam, pretium a risus in, porttitor dapibus erat. Sed sit amet fringilla ipsum, eget iaculis augue. Integer sollicitudin tortor quis ultricies aliquam. Suspendisse fringilla nunc in tellus cursus, at placerat tellus scelerisque. Sed tempus elit a sollicitudin rhoncus. Nulla facilisi. Morbi nec dolor dolor. Orci varius natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Cras et aliquet lectus. Pellentesque sit amet eros nisi. Quisque ac sapien in sapien congue accumsan. Nullam in posuere ante. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae; Proin lacinia leo a nibh fringilla pharetra.
Orci varius natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Proin venenatis lectus dui, vel ultrices ante bibendum hendrerit. Aenean egestas feugiat dui id hendrerit. Orci varius natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Curabitur in tellus laoreet, eleifend nunc id, viverra leo. Proin vulputate non dolor vel vulputate. Curabitur pretium lobortis felis, sit amet finibus lorem suscipit ut. Sed non mollis risus. Duis sagittis, mi in euismod tincidunt, nunc mauris vestibulum urna, at euismod est elit quis erat. Phasellus accumsan vitae neque eu placerat. In elementum arcu nec tellus imperdiet, eget maximus nulla sodales. Curabitur eu sapien eget nisl sodales fermentum.
Phasellus pulvinar ex id commodo imperdiet. Praesent odio nibh, sollicitudin sit amet faucibus id, placerat at metus. Donec vitae eros vitae tortor hendrerit finibus. Interdum et malesuada fames ac ante ipsum primis in faucibus. Quisque vitae purus dolor. Duis suscipit ac nulla et finibus. Phasellus ac sem sed dui dictum gravida. Phasellus eleifend vestibulum facilisis. Integer pharetra nec enim vitae mattis. Duis auctor, lectus quis condimentum bibendum, nunc dolor aliquam massa, id bibendum orci velit quis magna. Ut volutpat nulla nunc, sed interdum magna condimentum non. Sed urna metus, scelerisque vitae consectetur a, feugiat quis magna. Donec dignissim ornare nisl, eget tempor risus malesuada quis.

View File

@ -1,11 +0,0 @@
---
title: Adding RSS Support - RSS Truncation Test
author: Eric Nakagawa
authorURL: http://twitter.com/ericnakagawa
authorFBID: 661277173
---
1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890
This should be truncated.
<!--truncate-->
This line should never render in XML.

View File

@ -1,10 +0,0 @@
---
title: Adding RSS Support
author: Eric Nakagawa
authorURL: http://twitter.com/ericnakagawa
authorFBID: 661277173
---
This is a test post.
A whole bunch of other information.

View File

@ -1,8 +0,0 @@
---
title: New Version 1.0.0
author: Eric Nakagawa
authorURL: http://twitter.com/ericnakagawa
authorFBID: 661277173
---
This blog post will test file name parsing issues when periods are present.

View File

@ -0,0 +1,6 @@
---
title: Introducing LIGO
author: Matej Sima
---
Hello LIGO

View File

@ -24,78 +24,45 @@ class Footer extends React.Component {
render() {
return (
<footer className="nav-footer" id="footer">
{/* <section className="sitemap">
<a href={this.props.config.baseUrl} className="nav-home">
{this.props.config.footerIcon && (
<img
src={this.props.config.baseUrl + this.props.config.footerIcon}
alt={this.props.config.title}
width="66"
height="58"
/>
)}
</a>
<section className="sitemap">
<a className="nav-home"></a>
<div>
<h5>Docs</h5>
<a href={this.docUrl('doc1.html', this.props.language)}>
Getting Started (or other categories)
<a href={this.docUrl('setup-installation.html', this.props.language)}>
Installation
</a>
<a href={this.docUrl('doc2.html', this.props.language)}>
Guides (or other categories)
<a href={this.docUrl('api-cli-commands.html', this.props.language)}>
CLI Commands
</a>
<a href={this.docUrl('doc3.html', this.props.language)}>
API Reference (or other categories)
<a href={this.docUrl('contributors/origin.html', this.props.language)}>
Contribute
</a>
</div>
<div>
<h5>Community</h5>
<a href={this.pageUrl('users.html', this.props.language)}>
User Showcase
</a>
<a
href="http://stackoverflow.com/questions/tagged/"
href="https://tezos.stackexchange.com/questions/tagged/ligo"
target="_blank"
rel="noreferrer noopener">
Stack Overflow
</a>
<a href="https://discordapp.com/">Project Chat</a>
<a
href="https://twitter.com/"
target="_blank"
rel="noreferrer noopener">
Twitter
Tezos Stack Exchange
</a>
</div>
<div>
<h5>More</h5>
<a href={`${this.props.config.baseUrl}blog`}>Blog</a>
<a href="https://github.com/">GitHub</a>
<a
className="github-button"
href={this.props.config.repoUrl}
data-icon="octicon-star"
data-count-href="/facebook/docusaurus/stargazers"
data-show-count="true"
data-count-aria-label="# stargazers on GitHub"
aria-label="Star this project on GitHub">
Star
</a>
<a href={this.docUrl('tutorials/first-smart-contract.html', this.props.language)}>Tutorials</a>
<a href={`${this.props.config.repoUrl}`}>Gitlab</a>
</div>
</section> */}
</section>
<a
href="https://opensource.facebook.com/"
target="_blank"
rel="noreferrer noopener"
className="fbOpenSource">
<img
src={`${this.props.config.baseUrl}img/oss_logo.png`}
alt="Facebook Open Source"
width="170"
height="45"
/>
</a>
<section className="copyright">
Website built with <a
href="https://docusaurus.io/"
target="_blank"
rel="noreferrer noopener">
Docusaurus
</a> by Facebook.
<div>Icons made by <a href="https://www.flaticon.com/authors/lucy-g" title="Lucy G">Lucy G</a> from <a href="https://www.flaticon.com/" title="Flaticon">www.flaticon.com</a> is licensed by <a href="http://creativecommons.org/licenses/by/3.0/" title="Creative Commons BY 3.0" target="_blank">CC 3.0 BY</a></div>
{this.props.config.copyright}
</section>

View File

@ -6,6 +6,8 @@
"publish-gh-pages": "docusaurus-publish",
"write-translations": "docusaurus-write-translations",
"version": "docusaurus-version",
"preversion": "node preversion.js",
"postversion": "node postversion.js",
"rename-version": "docusaurus-rename-version"
},
"devDependencies": {

View File

@ -26,22 +26,24 @@ class HomeSplash extends React.Component {
<div className="homeSplashFade">
<div className="wrapper homeWrapper">
<div class="tabs">
<div class="nav-tabs">
<div id="tab-group-3-tab-4" class="nav-link active" data-group="group_3"
<div className="tabs">
<div className="nav-tabs">
<div id="tab-group-3-tab-4" className="nav-link active" data-group="group_3"
data-tab="tab-group-3-content-4">Pascaligo</div>
{/* <div id="tab-group-3-tab-5" class="nav-link" data-group="group_3"
<div className="nav-link">Camligo (coming soon)</div>
<div className="nav-link">Reasonligo (coming soon) </div>
{/* <div id="tab-group-3-tab-5" className="nav-link" data-group="group_3"
data-tab="tab-group-3-content-5">Camligo</div> */}
</div>
<div class="tab-content">
<div id="tab-group-3-content-4" class="tab-pane active" data-group="group_3" tabIndex="-1">
<div className="tab-content">
<div id="tab-group-3-content-4" className="tab-pane active" data-group="group_3" tabIndex="-1">
<div>
<span>
<pre><code class="hljs css language-Pascal">// variant defining pseudo multi-entrypoint actions<br />type action is<br />| Increment of int<br />| Decrement of int<br /><br />function add (const a : int ; const b : int) : int is<br /> block {'{ skip }'} with a + b<br /><br />function subtract (const a : int ; const b : int) : int is<br /> block {'{ skip }'} with a - b<br /><br />// real entrypoint that re-routes the flow based on the action provided<br />function main (const p : action ; const s : int) : (list(operation) * int) is<br /> block {'{ skip }'} with ((nil : list(operation)),<br /> case p of<br /> | Increment n -&gt; add(s, n)<br /> | Decrement n -&gt; subtract(s, n)<br /> end)<br /></code></pre>
<pre><code className="hljs css language-Pascal">// variant defining pseudo multi-entrypoint actions<br />type action is<br />| Increment of int<br />| Decrement of int<br /><br />function add (const a : int ; const b : int) : int is<br /> block {'{ skip }'} with a + b<br /><br />function subtract (const a : int ; const b : int) : int is<br /> block {'{ skip }'} with a - b<br /><br />// real entrypoint that re-routes the flow based on the action provided<br />function main (const p : action ; const s : int) : (list(operation) * int) is<br /> block {'{ skip }'} with ((nil : list(operation)),<br /> case p of<br /> | Increment n -&gt; add(s, n)<br /> | Decrement n -&gt; subtract(s, n)<br /> end)<br /></code></pre>
</span>
</div>
</div>
<div id="tab-group-3-content-5" class="tab-pane" data-group="group_3" tabIndex="-1">
<div id="tab-group-3-content-5" className="tab-pane" data-group="group_3" tabIndex="-1">
<div>
<span>
SOON
@ -90,9 +92,9 @@ class HomeSplash extends React.Component {
<div className="inner">
<ProjectTitle siteConfig={siteConfig} />
<PromoSection>
<Button href={docUrl('setup-installation.html')}>Getting started</Button>
<Button href={docUrl('contributors/origin.html')}>Contributing</Button>
<Button href={docUrl('setup-installation.html')}>Get Started</Button>
<Button href={docUrl('tutorials/first-smart-contract.html')}>Tutorials</Button>
<Button href={docUrl('contributors/origin.html')}>Contribute</Button>
</PromoSection>
</div>
</SplashContainer>

View File

@ -0,0 +1,115 @@
/**
* Copyright (c) 2017-present, Facebook, Inc.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
const React = require('react');
const CompLibrary = require('../../core/CompLibrary');
const Container = CompLibrary.Container;
const CWD = process.cwd();
const versions = require(`${CWD}/versions.json`);
function Versions(props) {
const {config: siteConfig} = props;
const latestVersion = versions[0];
const repoUrl = `https://github.com/${siteConfig.organizationName}/${
siteConfig.projectName
}`;
return (
<div className="docMainWrapper wrapper">
<Container className="mainContainer versionsContainer">
<div className="post">
<header className="postHeader">
<h1>{siteConfig.title} Versions</h1>
</header>
<h3 id="latest">Current version (Stable)</h3>
<table className="versions">
<tbody>
<tr>
<th>{latestVersion}</th>
<td>
{/* You are supposed to change this href where appropriate
Example: href="<baseUrl>/docs(/:language)/:id" */}
<a
href={`${siteConfig.baseUrl}${siteConfig.docsUrl}/${
props.language ? props.language + '/' : ''
}setup-installation`}>
Documentation
</a>
</td>
<td>
<a href={repoUrl}>Source Code</a>
</td>
{/* <td>
<a href="">Release Notes</a>
</td> */}
</tr>
</tbody>
</table>
<h3 id="rc">Pre-release versions</h3>
<table className="versions">
<tbody>
<tr>
<th>next</th>
<td>
{/* You are supposed to change this href where appropriate
Example: href="<baseUrl>/docs(/:language)/next/:id" */}
<a
href={`${siteConfig.baseUrl}${siteConfig.docsUrl}/${
props.language ? props.language + '/' : ''
}next/setup-installation`}>
Documentation
</a>
</td>
<td>
<a href={repoUrl}>Source Code</a>
</td>
</tr>
</tbody>
</table>
<h3 id="archive">Past Versions</h3>
<p>Here you can find previous versions of the documentation.</p>
<table className="versions">
<tbody>
{versions.map(
version =>
version !== latestVersion && version !== "next" && (
<tr>
<th>{version}</th>
<td>
{/* You are supposed to change this href where appropriate
Example: href="<baseUrl>/docs(/:language)/:version/:id" */}
<a
href={`${siteConfig.baseUrl}${siteConfig.docsUrl}/${
props.language ? props.language + '/' : ''
}${version}/setup-installation`}>
Documentation
</a>
</td>
<td>
<a href={`${repoUrl}/releases/tag/v${version}`}>
Release Notes
</a>
</td>
</tr>
),
)}
</tbody>
</table>
<p>
You can find past versions of this project on{' '}
<a href={repoUrl}>Gitlab</a>.
</p>
</div>
</Container>
</div>
);
}
module.exports = Versions;

View File

@ -0,0 +1 @@
// require('./preversion');

View File

@ -0,0 +1,8 @@
// This script is used to remove 'next' from the versions.json file in order to re-create in the CI
const versions = require('./versions.json')
const fs = require('fs');
const versionsWithoutNext = versions
.filter(version => version !== "next");
fs.writeFileSync("./versions.json", JSON.stringify(versionsWithoutNext));

View File

@ -5,7 +5,7 @@
"API": ["api-cli-commands"]
},
"contributors-docs": {
"Introduction": ["contributors/origin", "contributors/philosophy"],
"Introduction": ["contributors/origin", "contributors/philosophy", "contributors/getting-started", "contributors/documentation-and-releases"],
"Big Picture": [
"contributors/big-picture/overview",
"contributors/big-picture/front-end",
@ -13,7 +13,9 @@
"contributors/big-picture/back-end",
"contributors/big-picture/vendors"
],
"Road Map": ["contributors/road-map/short-term", "contributors/road-map/long-term"],
"Contributing": ["contributors/contributing/getting-started"]
"Road Map": ["contributors/road-map/short-term", "contributors/road-map/long-term"]
},
"tutorials": {
"Get Started": ["tutorials/first-smart-contract"]
}
}

View File

@ -14,7 +14,7 @@ const partners = [
caption: 'Nomadic Labs',
// You will need to prepend the image path with your baseUrl
// if it is not '/', like: '/test-site/img/image.jpg'.
image: 'https://media.licdn.com/dms/image/C560BAQGE4y1pddQlrw/company-logo_200_200/0?e=2159024400&v=beta&t=aszI_Js3VuY7P20n1pYVAJmeRhM1kC_ftMrowcQa2ZQ',
image: '/img/nomadic-logo.jpg',
infoLink: 'https://www.nomadic-labs.com/',
pinned: true,
},
@ -22,7 +22,7 @@ const partners = [
caption: 'Tocqueville Group',
// You will need to prepend the image path with your baseUrl
// if it is not '/', like: '/test-site/img/image.jpg'.
image: 'https://tqgroup.io/static/images/logo.svg',
image: '/img/tq-logo.svg',
infoLink: 'https://tqgroup.io/',
pinned: true,
},
@ -30,7 +30,7 @@ const partners = [
caption: 'Stove Labs',
// You will need to prepend the image path with your baseUrl
// if it is not '/', like: '/test-site/img/image.jpg'.
image: 'https://stove-labs.com/logo_transparent.png',
image: '/img/stove-logo.png',
infoLink: 'https://stove-labs.com',
pinned: true,
},
@ -46,7 +46,7 @@ const team = [
pinned: true,
},
{
caption: 'Georges Duperon',
caption: 'Georges Dupéron',
// You will need to prepend the image path with your baseUrl
// if it is not '/', like: '/test-site/img/image.jpg'.
image: 'https://thepowerofthedream.org/wp-content/uploads/2015/09/generic-profile-picture-600x600.jpg',
@ -99,7 +99,9 @@ const siteConfig = {
headerLinks: [
{doc: 'setup-installation', label: 'Docs'},
{doc: 'api-cli-commands', label: 'CLI'},
{doc: 'contributors/origin', label: 'Contributing'},
{doc: 'tutorials/first-smart-contract', label: 'Tutorials'},
{ blog: true, label: 'Blog' },
{doc: 'contributors/origin', label: 'Contribute'},
],
// If you have users set above, you add it here:
@ -108,8 +110,8 @@ const siteConfig = {
/* path to images for header/footer */
headerIcon: 'img/logo.svg',
footerIcon: 'img/favicon.ico',
favicon: 'img/favicon.ico',
footerIcon: 'img/logo.svg',
favicon: 'img/logo.svg',
/* Colors for website */
colors: {
@ -159,7 +161,7 @@ const siteConfig = {
// You may provide arbitrary config keys to be used as needed by your
// template. For example, if you need your repo's URL...
// repoUrl: 'https://github.com/facebook/test-site',
repoUrl: 'https://gitlab.com/ligolang/ligo',
};
module.exports = siteConfig;

View File

@ -1,9 +1,3 @@
ul {
max-width: 350px;
margin: 0 auto;
text-align: left;
}
.projectTitle small {
max-width: 700px;
text-align: center;
@ -36,12 +30,30 @@ ul {
}
.homeContainer .tabs {
width: 800px;
max-width: 800px;
margin: 0 auto;
border-top: none;
border-bottom: 4px solid #e0e0e0;
}
.homeContainer .tabs .nav-tabs > div.active {
border-bottom: none;
}
.homeContainer .tabs .nav-tabs > div {
cursor: default;
color: #24292e64;
}
.homeContainer .tabs .nav-tabs > div:first-of-type {
cursor: pointer;
color: #24292e;
}
.homeContainer .tabs .nav-tabs > div.active:first-of-type {
border-bottom: 4px solid #1A1A1A;
}
.homeContainer .tab-content {
border-top: 4px solid #e0e0e0;
}
@ -57,26 +69,41 @@ ul {
border: 1px solid #B2210C;
color: #B2210C;
}
/*
dark red: B2210C
*/
.button:hover, .promoSection .buttonWrapper:first-of-type > a.button {
background: #B2210C;
color: white;
}
blockquote {
background-color: rgba(178, 33, 12, 0.7);
border-left: 8px solid #B2210C;
color: white;
background-color: rgba(26, 26, 26, 0.6);
border-left: 8px solid rgba(26, 26, 26, 0.7);
color: rgba(255,255,255, 0.8);
}
blockquote a {
color: rgba(255,255,255, 0.8);
border-bottom: 1px solid rgba(255,255,255, 0.8);
}
blockquote a:hover {
color: rgba(255,255,255, 1);
border-bottom: 1px solid rgba(255,255,255, 1);
}
/*
blockquote {
background-color: rgba(252, 214, 0, 0.687);
border-left-color: rgba(240, 210, 37, 1);
color: rgba(0, 0, 0, 0.632);
} */
a {
color: rgba(26, 26, 26, 0.7);
color: rgba(12, 12, 12, 0.8);
}
a:hover {
color: rgba(26, 26, 26, 1);
color: rgb(12, 12, 12);
}
.homeContainer .homeWrapper .projectLogo {

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 21 KiB

View File

@ -0,0 +1,16 @@
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="87" height="53" viewBox="0 0 87 53">
<defs>
<polygon id="logo-a" points=".351 .415 52.636 .415 52.636 52.729 .351 52.729"/>
</defs>
<g fill="none" fill-rule="evenodd">
<path fill="#2C7DF7" d="M59.516954,1.00802118 C45.2851511,1.00802118 33.7452679,12.5525859 33.7452679,26.7895271 C33.7452679,41.0328212 45.2851511,52.5767506 59.516954,52.5767506 C59.8395526,52.5767506 60.1621511,52.5716682 60.4796693,52.5557859 L60.4796693,43.7677624 C60.1621511,43.7836447 59.8395526,43.7944447 59.516954,43.7944447 C50.1298445,43.7944447 42.5189321,36.1804447 42.5189321,26.7895271 C42.5189321,17.4043271 50.1298445,9.79032706 59.516954,9.79032706 C68.4919248,9.79032706 75.8424723,16.7531506 76.4717934,25.5678565 L85.2670489,25.5678565 C84.6269321,11.8963271 73.3461438,1.00802118 59.516954,1.00802118"/>
<g transform="translate(33.022 .22)">
<mask id="logo-b" fill="#fff">
<use xlink:href="#logo-a"/>
</mask>
<path fill="#2C7DF7" d="M26.4950562,1.16055529 C12.4893263,1.16055529 1.09677153,12.5590024 1.09677153,26.5697788 C1.09677153,40.5830965 12.4893263,51.9834494 26.4950562,51.9834494 C26.6919175,51.9834494 26.8887788,51.9821788 27.0843701,51.9764612 L27.0843701,43.9361788 C26.8887788,43.9431671 26.6919175,43.9469788 26.4950562,43.9469788 C16.9168007,43.9469788 9.12426788,36.1512847 9.12426788,26.5697788 C9.12426788,16.9908141 16.9168007,9.19702588 26.4950562,9.19702588 C35.4490708,9.19702588 42.9812387,16.1001318 43.7934504,24.9745553 L51.8520635,24.9745553 C51.0233409,11.5889082 39.959735,1.16055529 26.4950562,1.16055529 M26.4950562,52.7292847 C12.0797277,52.7292847 0.351238686,40.9941318 0.351238686,26.5697788 C0.351238686,12.1479671 12.0797277,0.41472 26.4950562,0.41472 C40.4887204,0.41472 51.9625599,11.3589318 52.6172825,25.3296847 L52.6363336,25.7203906 L43.1025307,25.7203906 L43.0777642,25.37352 C42.4611438,16.7208141 35.1766401,9.94286118 26.4950562,9.94286118 C17.3276693,9.94286118 9.86980073,17.4012141 9.86980073,26.5697788 C9.86980073,35.7408847 17.3276693,43.2011435 26.4950562,43.2011435 C26.8113044,43.2011435 27.1281876,43.1903435 27.4387204,43.1750965 L27.8299029,43.1560376 L27.8299029,52.6898965 L27.4761876,52.70832 C27.152954,52.7242024 26.8240051,52.7292847 26.4950562,52.7292847" mask="url(#logo-b)"/>
</g>
<polyline fill="#2C7DF7" points="0 .702 59.77 .702 59.77 9.247 25.926 9.247 25.926 52.348 16.634 52.348 16.634 9.247 0 9.247"/>
<polygon fill="#2C7DF7" points="73.762 34.836 69.072 40.756 81.951 51.427 86.647 45.633"/>
</g>
</svg>

After

Width:  |  Height:  |  Size: 2.6 KiB

View File

@ -0,0 +1,48 @@
---
id: version-next-api-cli-commands
title: CLI Commands
original_id: api-cli-commands
---
Contracts written in Ligo can be compiled using the `ligo` executable.
## Compiling a contract
Compile your contract with a specific entry point.
```zsh
ligo compile-contract SOURCE_FILE [ENTRY_POINT]
```
#### Example
```zsh
ligo compile-contract examples/counter.ligo main
```
## Defining the initial storage
If your contract implements a sophisticated storage, you can compile a Ligo expression into a Michelson value quite easily.
```zsh
ligo compile-storage SOURCE_FILE ENTRY_POINT EXPRESSION
```
#### Example
```zsh
ligo compile-storage examples/counter.ligo main 5
# Outputs: 5
```
## Invoking the contract with a parameter
```zsh
ligo compile-parameter SOURCE_FILE ENTRY_POINT EXPRESSION
```
#### Example
```zsh
ligo compile-parameter examples/counter.ligo main "Increment(5)"
# Outputs: (Right 5)
```

View File

@ -0,0 +1,19 @@
---
id: version-next-back-end
title: Back End
original_id: back-end
---
The Back-End is the part that compiles down to Michelson. Instead of a single compilation step, it is separated in two parts.
## Transpiler and Mini_C
The Transpiler is a function that takes as input the Typed AST, and outputs expressions in a language that is basically a Michelson based on with named variables and first-class-environments.
On the one hand, there are cases in the AST like `E_if_bool` or `E_make_empty_list` that would be directly translated in Michelson like `IF {} {}` or `NIL`.
On the other hand, there are cases in the AST like `E_variable` or `E_environment_select` that specifically target the compiler.
The files of the Transpiler are in `transpiler/`, while those of Mini_c are in `mini_c/`.
## Compiler
The previous LIGOs compilation to Michelson model was quite complicated. The current one is quite straightforward, where the environment of variables (x -> 12, y -> “foo”) is compiled as Michelson stack (12 :: foo).
It has been simplified for multiple reasons:
Having a simple model reduces its number of points of failure.
Having a simple model makes optimizing it easier.
We submitted a change to the Tezos protocol that actually make it more efficient.

View File

@ -0,0 +1,16 @@
---
id: version-next-front-end
title: Front End
original_id: front-end
---
The Front-End is the part that deals with all syntactical matters. LIGO supports multiple Front-Ends. Each Front-End is composed of three different parts.
## Parser
A Parser is a function that takes a string of source code and outputs a structured representation of the program. This part usually uses Menhir, a parser generator compatible with OCaml.
Its files are in `parser/parser_name`.
## Concrete Syntax Tree
The CST is the aforementioned structured representation of the program. Is is structurally very close to the source code, and is mostly an intermediary there because manipulating string is not practical.
Its files are in `parser/parser_name`.
## Simplifier
A Simplifier is a function that takes a CST and outputs the corresponding Common AST. This is the actual bridge between a given syntax and LIGO.
Its files are in `simplify/parser_name`.

View File

@ -0,0 +1,17 @@
---
id: version-next-middle-end
title: Middle End
original_id: middle-end
---
The Middle-End is the core of LIGO. It is also composed of three parts.
## Common AST
The Common AST is the closest thing to what could be called “LIGO lang”. As such, it should be as simple as possible. Collapsing particular cases in more general constructs is encouraged. Documenting it is crucial for people wholl write new parsers or editor support for Front-end related things.
Its files are in `ast_simplified/`, of interest is the definition of the AST itself in `ast_simplified/types.ml`.
## Type Checker
The Type Checker, among other things, checks that a given AST is valid with regard to type-safety. It also annotates expressions with their types, free-variables and local environments.
As time passes, we want to make the type-system stronger, to encode arbitrarily complex properties in an extensible manner.
Its files are in `typer/`.
## Typed AST
The Typed AST is the result of Type Checker. On top of it, we also want to define/export many features aiming at making building tools on top LIGO as easy as possible.
Its files are in `ast_typed/`, of interest is the definition of the Typed AST itself in `ast_typed/types.ml`.

View File

@ -0,0 +1,17 @@
---
id: version-next-overview
title: Overview
original_id: overview
---
After going through the design principles and a few considerations linked to them, getting the Big Picture needs diving in technical matters.
![LIGO Overview](/img/big-picture-overview.png)
As shown in the Schema, LIGOs compiler is separated in roughly 3 separate parts:
- The Middle End. This is the core of LIGO. It defines its core data-structure (the Common AST), and its type-checking algorithm.
- The Front End. This is the bridge between a given syntax and the Common AST.
- The Back End. This is the bridge between the Common AST and a given compilation target. Currently, our only target is Michelson, but well also target Marigold, and if Tezos moves to Web Assembly, Web Assembly.

View File

@ -0,0 +1,22 @@
---
id: version-next-vendors
title: Vendors
original_id: vendors
---
Next to LIGOs main pipeline, we use some other libraries, that are in the folder `vendors`.
## ligo-utils
This, quite expectedly, defines utilities that are used in LIGO.
There are three kinds of utilities, corresponding to their dependencies.
`tezos-utils` contain utilities that depend on some Tezos libraries.
`proto-alpha-utils` contain utilities that depend on the compilation of some Tezos protocol. It is very big and thus cant be compiled in JS. This is because of a dependency to this that we dont have LIGO in the browser yet.
`simple-utils` contain most utilities. For instance, in `simple-utils` are `X_list` and `X_option`, that extend the `List` module and the `option` type found in `Pervasives`.
Of particular interest in `simple-utils` is `trace.ml`, a module used pervasively in LIGOs code-base. It deals with exceptions (and soon enough debugging annotations) in a functional manner. It offers a lot of utilities to build, combine and propagate exceptions. Given its used everywhere, that it relies on some advanced features of OCaml (higher order functions, ppx preprocessing) and that it exposes **a lot** of functions, its a good idea to look at this files documentation.
## tezos-modded
`tezos-modded` is a modded version of Tezos. There are modifications in it that are quite useful (exposing more functions from the protocol, giving more options to functions already defined), but not integrated yet.
It should in the end be integrated into the Tezos protocol, but until then, we use this.

View File

@ -0,0 +1,11 @@
---
id: version-next-origin
title: Origin
original_id: origin
---
LIGO is a programming language that aims to provide developers with an uncomplicated and safer way to implement smart-contracts. LIGO is currently being implemented for the Tezos blockchain and as a result, it compiles down to Michelson - the native smart-contract language of Tezos.
> Smart-contracts are programs that run within a blockchain network.
LIGO was initially meant to be a language for developing Marigold, on top of a hacky framework called Meta-Michelson. However, due to the attention received by the Tezos community, a decision has been put into action to develop LIGO as a standalone language that will support Tezos directly as well.

View File

@ -0,0 +1,46 @@
---
id: version-next-philosophy
title: Philosophy
original_id: philosophy
---
To understand LIGOs design choices, its important to get its philosophy. There are two main concerns that we have in mind when building LIGO.
## Safety
Once a smart-contract is deployed, it will likely be impossible to change it. You must get it right on the first try, and LIGO should help as much as possible. There are multiple ways to make LIGO a safer language for smart-contracts.
### Automated Testing
Automated Testing is the process through which a program will run some other program, and check that this other program behaves correctly.
There already is a testing library for LIGO programs written in OCaml that is used to test LIGO itself. Making it accessible to users will greatly improve safety. A way to do so would be to make it accessible from within LIGO.
### Static Analysis
Static analysis is the process of having a program analyze another one.
For instance, type systems are a kind of static analysis through which it is possible to find lots of bugs. There is already a fairly simple type system in LIGO, and we plan to make it much stronger.
### Conciseness
Writing less code gives you less room to introduce errors and that's why LIGO encourages writing lean rather than chunky smart-contracts.
---
## Ergonomics
Having an ergonomic product is crucial on multiple levels:
Making features easily accessible ensures theyll actually get used.
Not wasting users time on idiosyncrasies frees more time for making contracts safer or building apps.
Keeping users in a Flow state makes it possible to introduce more complex features in the language.
There are multiple ways to improve ergonomics.
### The Language
LIGO should contain as few surprises as possible. This is usually known as the principle of least surprise.
Most programmers who will use LIGO have already spent a lot of time learning to develop in an existing language, with its own set of conventions and expectations. These expectations are often the most important to accommodate. This is why C-style syntaxes are especially popular (e.g. JavaScript), C-style is well known and new languages want to take advantage of that familiarity. Therefore as an extension of the principle of least surprise, LIGO supports more than one syntax. The least surprising language for a new developer is the one that they have already learned how to use. Its probably not practical to replicate the syntax of every programming language, so LIGO takes the approach of replicating the structure used by languages from a particular paradigm.
It is packaged in a Docker container, so that no particular installation instructions are required.
### Editor Support
Without editor support, a lot of manipulations are very cumbersome. Checking for errors, testing, examining code, refactoring code, etc. This is why there is ongoing work on editor support, starting with highlighting and code-folding.
### Docs
Docs include documentation of the languages, tutorials, as well as examples and design patterns.
Were a long way from there. But having extensive docs is part of our goals.

View File

@ -0,0 +1,21 @@
---
id: version-next-long-term
title: Longer term
original_id: long-term
---
Soon enough, the Schema for the front-end will look like this:
![LIGO Overview](/img/generic-front-end.png)
Basically, as we support more syntaxes (up to half a dozen), well have a bigger need for a unified representation and generation of the helpers around it.
For instance:
Parsers. So far, parsers are generated by LR grammars. LR grammars have a steep learning curve, regularly making not worth it for someone to learn the whole formalism to extend a given grammar with a few cases. Generating those LR Grammars would thus save a lot of time.
Displayers. The idea is that if you can parse and display code in a given syntax, it becomes much easier to have a translator between each syntax. So that not only it becomes possible for users to write code in their favorite syntax, but also to only read code in their favorite syntax.
BNFs. BNF grammars are a common formalism to represent grammars. They are understood by many tools, and are an easy way to document a given syntax.
## Super Type System
Soon enough, the Schema for the middle-end will look like this:
![LIGO Overview](/img/super-type-system.png)
Basically, this schema shows that the Back-End will stop being the main consumer of the Typed AST, and the External World will in its stead.
As such, annotating the AST with quality information, documenting it and exposing the libraries that produced the information in the first place will be paramount.
The imagined type-system so far is a mixture of MLF, extensible data-types and Algebraic Effects.

View File

@ -0,0 +1,21 @@
---
id: version-next-short-term
title: Short term
original_id: short-term
---
## Documentation and Testing
We lack documentation and tests. Top priority.
Tests are needed at multiple levels:
Unit tests. Most utility functions should be tested individually.
Interface tests. Parts of the pipeline (Typer, Transpiler-Compiler, etc.) should be tested as black boxes.
Integration tests. Typical user scenarios, as interacted with the CLI, should be tested.
## Exposing Features
Many features have already been developed or nearly developed, and mostly need to be shown some attention, and then be exposed to the outside world, for instance:
Testing LIGO code
Step-by-step interpreter
LIGO in the browser
Propagating source locations for error messages
Dry-running a contract
## Refactoring
For the longer-term, its crucial to refactor big parts of the code base. This is needed to lower the complexity of the code base, so that its easier both for everyone (including API consumers) to interact with it.

View File

@ -0,0 +1,45 @@
---
id: version-next-language-basics-entrypoints
title: Entrypoints
original_id: language-basics-entrypoints
---
## Defining an entry point
<!--DOCUSAURUS_CODE_TABS-->
<!--Pascaligo-->
```Pascal
function main (const p : int ; const s : int) : (list(operation) * unit) is
block {skip} with ((nil : list(operation)), s + 1)
```
<!--END_DOCUSAURUS_CODE_TABS-->
## Multiple entry points
Multiple entrypoints are currently not supported in Michelson, however with Ligo, you can work that around by using variants.
<!--DOCUSAURUS_CODE_TABS-->
<!--Pascaligo-->
```Pascal
// variant defining pseudo multi-entrypoint actions
type action is
| Increment of int
| Decrement of int
function add (const a : int ; const b : int) : int is
block { skip } with a + b
function subtract (const a : int ; const b : int) : int is
block { skip } with a - b
// real entrypoint that re-routes the flow based on the action provided
function main (const p : action ; const s : int) : (list(operation) * int) is
block {skip} with ((nil : list(operation)),
case p of
| Increment n -> add(s, n)
| Decrement n -> subtract(s, n)
end)
```
<!--END_DOCUSAURUS_CODE_TABS-->

View File

@ -0,0 +1,23 @@
---
id: version-next-language-basics-functions
title: Functions
original_id: language-basics-functions
---
## Defining a function
<!--DOCUSAURUS_CODE_TABS-->
<!--Pascaligo-->
```Pascal
// multiply(1, 2) = 2
function multiply (const a : int ; const b : int) : int is
begin
const result : int = a * b ;
end with result
// add(1, 2) = 3
function add (const a : int ; const b : int) : int is
block { skip } with a + b
```
<!--END_DOCUSAURUS_CODE_TABS-->

View File

@ -0,0 +1,13 @@
---
id: version-next-language-basics-operators
title: Operators
original_id: language-basics-operators
---
## Available operators
|Michelson |Pascaligo |Description |
|--- |--- |--- |
| `SENDER` | `sender` | Address that initiated the current transaction
| `SOURCE` | `source` | Address that initiated the transaction, which triggered the current transaction. (useful e.g. when there's a transaction sent by another contract)
| `AMOUNT` | `amount` | Amount of tez sent by the transaction that invoked the contract

View File

@ -0,0 +1,19 @@
---
id: version-next-language-basics-variables
title: Variables
original_id: language-basics-variables
---
## Defining a variable
<!--DOCUSAURUS_CODE_TABS-->
<!--Pascaligo-->
```Pascal
// int
const four : int = 4;
// string
const name : string = "John Doe";
```
<!--END_DOCUSAURUS_CODE_TABS-->

View File

@ -0,0 +1,39 @@
---
id: version-next-setup-installation
title: Installation
original_id: setup-installation
---
There are currently two ways to get started with Ligo, both of those will allow you to use the Ligo CLI with your contracts. You can choose to use either the Docker image, or to compile & build the Ligo CLI yourself.
## Dockerized installation (recommended)
> 🐳 You can find instructions on how to install Docker [here](https://docs.docker.com/install/).
Easiest way to use LIGO is through the Docker image available at [Docker Hub](https://hub.docker.com/r/ligolang/ligo). Sources for the image can be found on [Gitlab](https://gitlab.com/ligolang/ligo/blob/master/docker/Dockerfile).
You can either run the docker image yourself, or you can setup a global ligo executable as shown below.
### Setting up a globally available `ligo` executable
> You can install additional ligo versions by replacing `next` with the required version number
```zsh
# next (pre-release)
curl https://gitlab.com/ligolang/ligo/raw/dev/scripts/installer.sh | bash "next"
# e.g. 1.0.0 (stable)
curl https://gitlab.com/ligolang/ligo/raw/master/scripts/installer.sh | bash "1.0.0"
```
**Verify your ligo installation by running:**
```zsh
ligo --help
```
## Manual installation (advanced)
For now, please refer to the steps described in the [Dockerfile](https://gitlab.com/ligolang/ligo/blob/master/docker/Dockerfile).

View File

@ -0,0 +1,40 @@
{
"version-next-docs": {
"Setup": [
"version-next-setup-installation"
],
"Language Basics": [
"version-next-language-basics-variables",
"version-next-language-basics-functions",
"version-next-language-basics-entrypoints",
"version-next-language-basics-operators"
],
"API": [
"version-next-api-cli-commands"
]
},
"version-next-contributors-docs": {
"Introduction": [
"version-next-contributors/origin",
"version-next-contributors/philosophy",
"version-next-contributors/getting-started",
"version-next-contributors/documentation-and-releases"
],
"Big Picture": [
"version-next-contributors/big-picture/overview",
"version-next-contributors/big-picture/front-end",
"version-next-contributors/big-picture/middle-end",
"version-next-contributors/big-picture/back-end",
"version-next-contributors/big-picture/vendors"
],
"Road Map": [
"version-next-contributors/road-map/short-term",
"version-next-contributors/road-map/long-term"
]
},
"version-next-tutorials": {
"Get Started": [
"version-next-tutorials/first-smart-contract"
]
}
}

View File

@ -0,0 +1,3 @@
[
"next"
]

View File

@ -3,10 +3,21 @@
# curl https://gitlab.com/ligolang/ligo/blob/master/scripts/installer.sh | bash
# Make sure the marigold/ligo image is published at docker hub first
set -euET -o pipefail
echo "Installing LIGO"
version=$1
printf "\nInstalling LIGO ($version)\n\n"
# Install the ligo.sh from master
wget https://gitlab.com/ligolang/ligo/blob/master/scripts/ligo.sh
if [ $version = "next" ]
then
# Install the ligo.sh from master
wget https://gitlab.com/ligolang/ligo/raw/dev/scripts/ligo.sh
else
# Install the ligo.sh from master
wget https://gitlab.com/ligolang/ligo/raw/master/scripts/ligo.sh
fi
# Overwrite LIGO version in the executable
sed -i '' "s/latest/$version/g" ligo.sh
# Copy the exucutable to the appropriate directory
sudo cp ligo.sh /usr/local/bin/ligo
@ -14,7 +25,7 @@ sudo chmod +x /usr/local/bin/ligo
rm ligo.sh
# Pull the docker image used by ligo.sh
docker pull ligolang/ligo:latest
docker pull "ligolang/ligo:$version"
# Installation finished, try running 'ligo' from your CLI
echo "Installation successful, try to run 'ligo --help' now. \n"
printf "\nInstallation successful, try to run 'ligo --help' now.\n"

View File

@ -104,7 +104,7 @@ let keywords = Token.[
"and", None;
"as", None;
"asr", None;
"assert", None;
(* "assert", None;*)
"class", None;
"constraint", None;
"do", None;

View File

@ -179,11 +179,18 @@ tuple(item):
(* Possibly empty semicolon-separated values between brackets *)
list_of(item):
lbracket sepseq(item,semi) rbracket {
{opening = LBracket $1;
elements = $2;
terminator = None;
closing = RBracket $3} }
lbracket sep_or_term_list(item,semi) rbracket {
let elements, terminator = $2 in {
opening = LBracket $1;
elements = Some elements;
terminator;
closing = RBracket $3}
}
| lbracket rbracket {
{opening = LBracket $1;
elements = None;
terminator = None;
closing = RBracket $2} }
(* Main *)

View File

@ -1 +0,0 @@
let version = "UNKNOWN"