Skip to content

Commit 9eac1e3

Browse files
Merge pull request #21 from ian-h-chamberlain/release-redcode-extension
Prepare redcode extension for release 0.0.3
2 parents 0d60f83 + 3eaeae8 commit 9eac1e3

12 files changed

+1134
-0
lines changed

.github/workflows/redcode-ci.yml

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
on:
2+
push:
3+
branches:
4+
- master
5+
- develop
6+
paths:
7+
- redcode/**
8+
pull_request:
9+
branches:
10+
- master
11+
- develop
12+
paths:
13+
- redcode/**
14+
15+
defaults:
16+
run:
17+
working-directory: redcode
18+
19+
jobs:
20+
build:
21+
strategy:
22+
matrix:
23+
os:
24+
- macos-latest
25+
- ubuntu-latest
26+
- windows-latest
27+
runs-on: ${{ matrix.os }}
28+
steps:
29+
- name: Checkout branch
30+
uses: actions/checkout@v2
31+
- name: Install Node.js
32+
uses: actions/setup-node@v1
33+
with:
34+
node-version: 10.x
35+
- name: Install dependencies
36+
run: npm install
37+
- name: Build extension
38+
run: npm run build
39+
- name: Verify the build did not modify any files
40+
run: git diff --exit-code HEAD -- .
Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
on:
2+
release:
3+
types:
4+
- created
5+
6+
defaults:
7+
run:
8+
working-directory: redcode
9+
10+
jobs:
11+
publish:
12+
if: startsWith(github.ref, "refs/tags/redcode-")
13+
runs-on: ubuntu-latest
14+
steps:
15+
- name: Checkout
16+
uses: actions/checkout@v2
17+
- name: Set version string
18+
id: get_name
19+
run: echo "::set-output name=PACKAGE::$(echo '${{ github.ref }}' | awk -F '[/]' '{print $3}').vsix"
20+
- name: Install Node.js
21+
uses: actions/setup-node@v1
22+
with:
23+
node-version: 10.x
24+
- name: Install dependencies
25+
run: npm install
26+
- name: Package extension
27+
run: npm run package -- --out ${{ steps.get_name.outputs.PACKAGE }}
28+
- name: Upload extension to Github
29+
uses: actions/upload-release-asset@v1
30+
env:
31+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
32+
with:
33+
upload_url: ${{ github.event.upload_url }}
34+
asset_path: ./${{ steps.get_name.outputs.PACKAGE }}
35+
asset_name: ${{ steps.get_name.outputs.PACKAGE }}
36+
asset_content_type: application/vsix
37+
- name: Publish extension to VSCode marketplace
38+
run: npm run deploy
39+
env:
40+
VSCE_PAT: ${{ secrets.VSCE_PAT }}

redcode/.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
node_modules
2+
*.vsix

redcode/.vscodeignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
.vscode/**
2+
.vscode-test/**
3+
.gitignore
4+
vsc-extension-quickstart.md

redcode/CHANGELOG.md

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
<!-- markdownlint-disable-file no-duplicate-header -->
2+
3+
# Change Log
4+
5+
All notable changes to the "redcode" extension will be documented in this file.
6+
Format based on [Keep a Changelog](http://keepachangelog.com/).
7+
8+
## Unreleased
9+
10+
## [0.0.3]
11+
12+
### Added
13+
14+
- CI for pull requests using Github Actions
15+
16+
## [0.0.2]
17+
18+
### Added
19+
20+
- INSTALL.md
21+
22+
### Changed
23+
24+
- Merge into [corewa.rs repository](http://github.com/ian-h-chamberlain/corewa_rs), update links to http://corewa.rs, etc.
25+
26+
### Fixed
27+
28+
- Fix build scripts, update dependencies, general cleanup
29+
30+
## [0.0.1]
31+
32+
### Added
33+
34+
- Initial syntax highlighting for redcode

redcode/INSTALL.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
# Redcode syntax highlighting
2+
3+
## Installing locally
4+
5+
```
6+
cd redcode
7+
npm install && npm run package
8+
code --install-extension <path-to-redcode>/redcode-<version>.vsix
9+
```
10+
11+
## Install from VS Code Marketplace
12+
13+
TODO. Not yet published

redcode/README.md

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
# Redcode Syntax highlighting
2+
3+
Basic syntax highlighting for Redcode, the language used in [Core Wars](https://corewa.rs).
4+
5+
## Features
6+
7+
Syntax highlighting for redcode, based partially on [this vim syntax file](https://www.vim.org/scripts/script.php?script_id=1705), and on the [pMARS '94 reference](https://corewa.rs/pmars-redcode-94.txt) and an [annotated version](https://corewa.rs/icws94.txt) of the ICWS '94 draft.
8+
9+
## Contents
10+
11+
* `package.json` - NPM package declaration for the extension
12+
* `package-lock.json` - pinned NPM dependencies
13+
* `syntaxes/redcode.tmLanguage.yaml` - the TextMate grammar definition, maintained for readability and editability
14+
* `syntaxes/redcode.tmLanguage.json` - the TextMate grammar file used for tokenization, generated from `redcode.tmLanguage.yaml`.
15+
* `language-configuration.json` - this the language configuration, defining the tokens that are used for comments and brackets
16+
17+
## Release Notes
18+
19+
See CHANGELOG.md
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
{
2+
"comments": {
3+
// symbol used for single line comment. Remove this entry if your language does not support line comments
4+
"lineComment": ";",
5+
},
6+
// symbols used as brackets
7+
"brackets": [
8+
["(", ")"]
9+
],
10+
// symbols that are auto closed when typing
11+
"autoClosingPairs": [
12+
["(", ")"],
13+
],
14+
// symbols that that can be used to surround a selection
15+
"surroundingPairs": [
16+
["(", ")"],
17+
]
18+
}

0 commit comments

Comments
 (0)