-
Notifications
You must be signed in to change notification settings - Fork 44
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
9 changed files
with
324 additions
and
1 deletion.
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 |
---|---|---|
@@ -1,3 +1,5 @@ | ||
## (UNRELEASED) Version 0.2.6 | ||
|
||
## 2018-09-20 Version 0.2.5 | ||
|
||
### New features | ||
|
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,35 @@ | ||
# Release procedure | ||
|
||
This document describes releasing a new version of NGS. | ||
|
||
* Build and run tests | ||
* Review the changes between `dev` and `master` | ||
* Update `CHANGELOG.md`. Place the release date in the section on the top. | ||
* Commit | ||
* Push | ||
* Wait and see that Travis build is OK | ||
* Checkout `master` branch | ||
* `git pull` | ||
* `git merge --no-commit dev` | ||
* Update `version.h` | ||
* Remove the `-alpha` or whatever pre-release mark. | ||
* `git add version.h` | ||
* Review the changes, special attention to `readme.md` as they differ a bit. | ||
* `git commit` | ||
* Build and run tests | ||
* Build documentation | ||
* `(cd doc && ./make.ngs out)` | ||
* `git push` | ||
* Wait and see that Travis build is OK | ||
* Update doc folder so that `latest` link points to the last version: `(cd doc/out && rm latest && ln -s $(ngs -p VERSION) latest)` | ||
* Sync documentation (to be scripted): `aws s3 sync --acl public-read doc/out/ s3://01.ngs-lang.org/doc/` | ||
* `(cd site && ./update.ngs)` (must be after syncing documentation because it invalidates caches) | ||
* Tag the release: `git tag v$(ngs -p VERSION)` | ||
* Push the tag: `git push origin v$(ngs -p VERSION)` | ||
* Create release on GitHub: https://github.com/ngs-lang/ngs/releases/new | ||
* select the newly created version for both tag and title | ||
* For description, take most important things from `CHANGELOG.md` and generalize them | ||
* At the end of description add: `` Detailed list of changes is in `CHANGELOG.md` `` | ||
* Checkout `dev` | ||
* Increase version in `version.h` | ||
* Make a new entry at the top of `CHANGELOG.md` |
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 @@ | ||
doc |
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,162 @@ | ||
<!doctype html> | ||
<html lang="en"> | ||
<head> | ||
<!-- Required meta tags --> | ||
<meta charset="utf-8"> | ||
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"> | ||
|
||
<!-- Bootstrap CSS --> | ||
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.1.1/css/bootstrap.min.css" | ||
integrity="sha384-WskhaSGFgHYWDcbwN70/dfYBj47jz9qbsMId/iRN3ewGhXQFZCSftd1LZCfmhktB" crossorigin="anonymous"> | ||
<link rel="stylesheet" href="main.css"> | ||
|
||
<title>NGS - Next Generation Shell</title> | ||
</head> | ||
<body> | ||
|
||
<div class="container pb-5"> | ||
<div class="row"> | ||
<div class="col-sm"> | ||
<h1>NGS - Next Generation Shell</h1> | ||
</div> | ||
</div> | ||
<div class="row pt-2"> | ||
<div class="col-md-3"> | ||
</div> | ||
<div class="col-md-6"> | ||
<p class="text-center text-justify main-thing-on-page"> | ||
NGS is a modern programming language with the focus on systems engineering. | ||
</p> | ||
<p class="text-center"> | ||
<span class="align-middle"><img src="ngs-logo-300.png" width="150" height="40"></span> | ||
</p> | ||
</div> | ||
<div class="col-md-3"> | ||
</div> | ||
</div> | ||
<div class="row"> | ||
<div class="col-sm"> | ||
<h2>About NGS</h2> | ||
|
||
<p> | ||
NGS is a unique combination of select features borrowed from other languages and original features. | ||
NGS was built from the ground up focusing on daily systems engineering tasks. | ||
</p> | ||
|
||
<p> | ||
One way to think about NGS is bash plus data structures plus better syntax and error handling. | ||
</p> | ||
|
||
<p> | ||
Scripting AWS is much easier with NGS, there is a <a href="https://ilya-sher.org/2016/07/06/declarative-primitives-or-mkdir-p-for-the-cloud/">Declarative Primitives style</a> library for that. | ||
</p> | ||
|
||
<p> | ||
If you need additional function or syntax in NGS, | ||
it's highly probable that it will be included in the language | ||
as long as it is for systems engineering tasks. | ||
</p> | ||
|
||
|
||
</div> | ||
<div class="col-sm"> | ||
<h2>Start using NGS</h2> | ||
<h4>Install NGS</h4> | ||
NGS runs on Linux and Mac. | ||
Please follow | ||
<a href="https://github.com/ilyash/ngs#compiling-and-running">the instructions to build NGS</a> on your | ||
computer. | ||
Packages (apt, brew and others) are coming soon. | ||
|
||
<h4>Run NGS inside docker</h4> | ||
<a href="https://github.com/ilyash/ngs#running-using-docker">Play with NGS inside docker - instructions</a> | ||
<h4>Documentation for NGS beginners</h4> | ||
<ul> | ||
<li><a href="doc/latest/man/ngstut.1.html">Examples-based tutorial</a> - understand how NGS feels like</li> | ||
<li><a href="doc/latest/man/ngslang.1.html">Full language description</a></li> | ||
<li><a href="doc/latest/man/ngsstyle.1.html">Coding style guide</a></li> | ||
<li><a href="doc/latest/man/ngswhy.1.html">Why use NGS? Why it was created?</a></li> | ||
</ul> | ||
</div> | ||
</div> | ||
<div class="row"> | ||
|
||
<div class="col-sm"> | ||
<h2>Sample NGS features</h2> | ||
<ul> | ||
<li> | ||
Common systems engineering scripting aspects are covered | ||
<ul> | ||
<li><code>retry</code> function</li> | ||
<li>environment-variable-controlled <code>debug</code> function</li> | ||
<li><code>log</code> function for neat logging</li> | ||
<li><code>status</code> function for what is semantically a status</li> | ||
</ul> | ||
</li> | ||
<li> | ||
Easy processes handling | ||
<ul> | ||
<li>small subset of bash syntax for redirections and pipes</li> | ||
<li>smart and customizable handling of processes' exit codes (including throwing exceptions)</li> | ||
<li>syntax for running a command and parsing the output</li> | ||
<li>process control with <code>p=$(my_process &); ... p.kill()</code></li> | ||
</ul> | ||
</li> | ||
<li> | ||
Structured data manipulation. While parsing text remains a necessity, many of today's tasks include talking to APIs. | ||
APIs return structured data. | ||
<ul> | ||
<li>Sample functions: <code>map</code>, <code>filter</code>, <code>reject</code>, <code>mapk</code> - | ||
maps hash keys, <code>mapv</code> - maps hash values, <code>group</code> - groups values into hash, | ||
<code>fetch</code> - reads and parses a file.</li> | ||
<li><code>collector</code> facility lets you accumulate result easily into array, | ||
hash or any user defined type.</li> | ||
<li><code>Table</code> for displaying tabular data elegantly</li> | ||
<li><code>Stats</code> type counts occurrences</li> | ||
<li> | ||
<code>Box</code>, <code>FullBox</code> and | ||
<code>EmptyBox</code> types represent containers with or without data in them. | ||
</li> | ||
</ul> | ||
</li> | ||
</ul> | ||
|
||
</div> | ||
<div class="col-sm"> | ||
<h2>Documentation</h2> | ||
<ul> | ||
<li><a href="doc/latest/index.html">Documentation Index</a> - main entry point to all documentation</li> | ||
</ul> | ||
</div> | ||
|
||
</div> | ||
<div class="row"> | ||
<div class="col-sm"> | ||
<h2>Source</h2> | ||
<a href="https://github.com/ngs-lang/ngs">https://github.com/ngs-lang/ngs</a> | ||
</div> | ||
<div class="col-sm"> | ||
<h2>Thanks</h2> | ||
<ul> | ||
<li>Thanks to all contributors to NGS</li> | ||
<li>Thanks to <a href="https://il.linkedin.com/company/beame-io">Beame.io</a> for hosting this site</li> | ||
</ul> | ||
</div> | ||
</div> | ||
</div> | ||
|
||
<!-- main advantages, maybe without comparison. multiple dispatch, take most approproiate features from other lang for systems engineering --> | ||
|
||
<!-- Optional JavaScript --> | ||
<!-- jQuery first, then Popper.js, then Bootstrap JS --> | ||
<script src="https://code.jquery.com/jquery-3.3.1.slim.min.js" | ||
integrity="sha384-q8i/X+965DzO0rT7abK41JStQIAqVgRVzpbzo5smXKp4YfRvH+8abtTE1Pi6jizo" | ||
crossorigin="anonymous"></script> | ||
<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.14.3/umd/popper.min.js" | ||
integrity="sha384-ZMP7rVo3mIykV+2+9J3UJ46jBk0WLaUAdn689aCwoqbBJiSnjAK/l8WvCWPIPm49" | ||
crossorigin="anonymous"></script> | ||
<script src="https://stackpath.bootstrapcdn.com/bootstrap/4.1.1/js/bootstrap.min.js" | ||
integrity="sha384-smHYKdLADwkXOn1EmN1qk/HfnUcbVRZyYmZ4qpPea6sjB/pTJ0euyQp0Mk8ck+5T" | ||
crossorigin="anonymous"></script> | ||
</body> | ||
</html> |
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,29 @@ | ||
#!/usr/bin/env ngs | ||
|
||
{ | ||
# Due to incomplete AWS2 implementation, this script fails. Just run it again. | ||
AWS = AWS2 | ||
DOMAIN = ENV.get('NGS_DOMAIN', 'ngs-lang.org') | ||
BUCKET_NAME = "01.${DOMAIN}" | ||
|
||
zone = AWS::Zone(Name=DOMAIN).converge() | ||
cert = AWS::Certificate(DomainName=DOMAIN).converge().the_one() | ||
dvo = cert.DomainValidationOptions.the_one() | ||
assert(dvo.ValidationMethod == 'DNS') | ||
rec = dvo.ResourceRecord | ||
AWS::RecordSet(ZoneName=DOMAIN + '.', Name=rec.Name, Type=rec.Type).converge(ResourceRecords=[{"Value": rec.Value}], TTL=600) | ||
bucket = AWS::Bucket(Name=BUCKET_NAME).converge() | ||
|
||
if not($(ok:[0, 255] aws s3api get-bucket-website --bucket ${BUCKET_NAME})) { | ||
bucket.resources[0].run("Setting website", %(aws s3 website "s3://${BUCKET_NAME}/" --index-document index.html --error-document error.html), false) | ||
} | ||
|
||
# $(top_level:: aws s3 sync --exclude '*.swp' --acl public-read ./ "s3://${BUCKET_NAME}/") | ||
# not implemented # dist = AWS::Distribution(Tags={'Name': 'ngs-site'}).converge() | ||
# aws cloudfront create-distribution --origin-domain-name s3.amazonaws.com | ||
|
||
# Manual steps: | ||
# * Create CloudFront distribution with origin s3.amazonaws.com/${BUCKET_NAME} | ||
# * Create DNS alias for @ | ||
|
||
} |
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,77 @@ | ||
/* | ||
https://material.io/guidelines/style/color.html#color-color-palette | ||
*/ | ||
|
||
h1, h2, h3, h4, h5, h6 { | ||
margin-top: 1em; | ||
color: #7B1FA2; | ||
} | ||
|
||
h1, h2 { | ||
text-align: center; | ||
} | ||
|
||
a { | ||
color: #00897b; | ||
} | ||
|
||
code { | ||
color: #d32f2f; | ||
} | ||
|
||
pre { | ||
padding: 1em; | ||
border-radius: 0.5em; | ||
box-shadow: 0 0 1px 0px black; | ||
} | ||
|
||
pre.example { | ||
background-color: #E0F2F1; | ||
} | ||
|
||
.underline-on-hover-only { | ||
text-decoration: none; | ||
} | ||
.underline-on-hover-only:hover { | ||
text-decoration: underline; | ||
} | ||
|
||
q { | ||
quotes: "\201C" "\201D" "\2018" "\2019"; | ||
} | ||
|
||
.unobtrusive { | ||
opacity: 0.38; | ||
} | ||
|
||
h1 .unobtrusive, | ||
nav .unobtrusive { | ||
font-size: 0.6em; | ||
opacity: 0.3; | ||
} | ||
|
||
.method-status { | ||
background-color: #7B1FA2; | ||
color: #FFFFFF; | ||
margin-left: 1em; | ||
border-radius: 0.25em; | ||
padding: 0.25em; | ||
font-weight: normal; | ||
box-shadow: 0 0 1px 0px black; | ||
font-size: 80%; | ||
} | ||
|
||
.logo { | ||
text-align: right; | ||
} | ||
|
||
.logo > img { | ||
width: 150px; | ||
height: 40px; | ||
} | ||
|
||
.main-thing-on-page { | ||
font-weight: 400; | ||
font-size: 120%; | ||
font-style: italic; | ||
} |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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,17 @@ | ||
#!/usr/bin/env ngs | ||
|
||
# Due to incomplete AWS2 implementation, this script fails. Just run it again. | ||
AWS = AWS2 | ||
DOMAIN = ENV.get('NGS_DOMAIN', 'ngs-lang.org') | ||
BUCKET_NAME = "01.${DOMAIN}" | ||
# Workaround for f*cked up AWS CLI (yes, one more place) | ||
# https://github.com/aws/aws-cli/issues/2473 | ||
# Could not aws s3 sync --exclude doc/* | ||
each(dir('.', true).path.without('doc').reject(/^\./), F(f) { | ||
$(top_level:: aws s3 cp --acl public-read ${f} "s3://${BUCKET_NAME}/${f}") | ||
|
||
}) | ||
# TODO: sync doc folder | ||
dist_id = ``aws cloudfront list-distributions``.filter(F(d) d.Aliases.Quantity and d.Aliases.Items.has(DOMAIN)).the_one().Id | ||
log("Will invalidate dist ${dist_id}") | ||
aws cloudfront create-invalidation --distribution-id $dist_id --paths '/*' |
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 |
---|---|---|
@@ -1,6 +1,6 @@ | ||
#ifndef VERSION_H | ||
#define VERSION_H | ||
|
||
#define NGS_VERSION "0.2.5-alpha" | ||
#define NGS_VERSION "0.2.6-alpha" | ||
|
||
#endif // VERSION_H |