Skip to content

Commit

Permalink
Replace "alygin.vscode-tlaplus" and "alygin.vscode-tlaplus-nightly"
Browse files Browse the repository at this point in the history
with "tlaplus-lang.tlaplus-lang" on Marketplace.

Part of Github issue #318
#318

[Build]

Signed-off-by: Markus Alexander Kuppe <github.com@lemmster.de>
  • Loading branch information
lemmy committed Aug 16, 2024
1 parent d2e1743 commit 8f5ead8
Show file tree
Hide file tree
Showing 15 changed files with 58 additions and 197 deletions.
23 changes: 0 additions & 23 deletions .github/workflows/nightly.sh

This file was deleted.

53 changes: 0 additions & 53 deletions .github/workflows/pre-release.yml

This file was deleted.

65 changes: 0 additions & 65 deletions .github/workflows/release-nightly.yml

This file was deleted.

60 changes: 35 additions & 25 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -1,18 +1,49 @@
name: Release

on: workflow_dispatch
on:
schedule:
- cron: "0 6 * * *"
repository_dispatch:
workflow_dispatch:

jobs:
checksecret:
name: check if VSCODE_MARKETPLACE_TLAPLUS_TOKEN is set in github secrets
runs-on: ubuntu-latest
outputs:
is_MY_SECRET_set: ${{ steps.checksecret_job.outputs.is_MY_SECRET_set }}
steps:
- name: Check secret present
id: checksecret_job
env:
MY_SECRET: ${{ secrets.VSCODE_MARKETPLACE_TLAPLUS_TOKEN }}
run: |
echo "is_MY_SECRET_set: ${{ env.MY_SECRET != '' }}"
echo "::set-output name=is_MY_SECRET_set::${{ env.MY_SECRET != '' }}"
build:
## Do not run this action without the marketplace token present,
## e.g., in a fork of this repo.
needs: [checksecret]
if: needs.checksecret.outputs.is_MY_SECRET_set == 'true'
runs-on: macOS-latest
steps:
- uses: actions/checkout@v1
- uses: actions/setup-node@v1
with:
node-version: '18.19'
- name: Get (latest) TLC
run: wget https://nightly.tlapl.us/dist/tla2tools.jar -O tools/tla2tools.jar
- name: Get (latest) CommunityModules
run: wget https://github.com/tlaplus/CommunityModules/releases/latest/download/CommunityModules-deps.jar -O tools/CommunityModules-deps.jar
- name: Prepare Release
run: |
## Create a git commit to use its date as the extension's version number below.
git add tools/*.jar -f
git commit -m "Latest CommunityModules and TLA+ tools"
- name: Get current version
id: version
run: echo "::set-output name=version::$(jq -r .version package.json)"
run: echo "::set-output name=version::$(git log -1 --format=%cd --date="format:%Y.%-m.%-d%H%M")"
- name: Install dependencies
run: |
npm install
Expand All @@ -26,26 +57,5 @@ jobs:
npm run lint
npm test --silent
- name: Publish to Marketplace
run: vsce publish --pat "${{ secrets.VSCODE_MARKETPLACE_TOKEN }}"
- name: Publish to Open VSX
run: npx ovsx publish "vscode-tlaplus-${{ steps.version.outputs.version }}.vsix" -p "${{ secrets.OPEN_VSX_TOKEN }}"
- name: Create Release
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: v${{ steps.version.outputs.version }}
release_name: v${{ steps.version.outputs.version }}
draft: false
prerelease: false
- name: Upload Release Asset
id: upload-release-asset
uses: actions/upload-release-asset@v1.0.1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: vscode-tlaplus-${{ steps.version.outputs.version }}.vsix
asset_name: vscode-tlaplus-${{ steps.version.outputs.version }}.vsix
asset_content_type: application/zip
run: |
vsce publish $(git log -1 --format=%cd --date="format:%Y.%-m.%-d%H%M") --pat "${{ secrets.VSCODE_MARKETPLACE_TLAPLUS_TOKEN }}"
4 changes: 2 additions & 2 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ For those, who want to write some code, here's a short guide.
Clone the repository:

```
git clone https://github.com/alygin/vscode-tlaplus.git
git clone https://github.com/tlaplus/vscode-tlaplus.git
cd vscode-tlaplus
```

Expand Down Expand Up @@ -158,7 +158,7 @@ The extension consists of the following components:
3. The implementation of the Check Result View panel that visualizes TLC output and allows to analyze it easily.
4. The `tla2tools.jar` file from the [official TLA+ project](https://github.com/tlaplus/tlaplus). All the specification syntax verifications, PlusCal translations and TLC checks are actually performed by this Java library.

The extension also requires a Java Virtual Machine (JVM) to be installed. [More information](https://github.com/alygin/vscode-tlaplus/wiki/Installing-Java).
The extension also requires a Java Virtual Machine (JVM) to be installed. [More information](https://github.com/tlaplus/vscode-tlaplus/wiki/Installing-Java).

# Project Layout

Expand Down
2 changes: 2 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
MIT License

Copyright (c) 2019 Andrew Lygin
Copyright (c) 2020 TLA+ Foundation


Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
10 changes: 0 additions & 10 deletions README-nightly.md

This file was deleted.

2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# TLA<sup>+</sup> for Visual Studio Code

[![Build Status](https://img.shields.io/github/actions/workflow/status/tlaplus/vscode-tlaplus/ci.yml?branch=master)](https://github.com/tlaplus/vscode-tlaplus/actions?query=workflow%3ACI) [![VS Code extension version](https://img.shields.io/visual-studio-marketplace/i/alygin.vscode-tlaplus?color=blue&label=Stable%20Release&style=flat-square)](https://marketplace.visualstudio.com/items?itemName=alygin.vscode-tlaplus) [![VS Code extension version nightly](https://img.shields.io/visual-studio-marketplace/i/alygin.vscode-tlaplus-nightly?color=blue&label=Nightly%20Build&style=flat-square)](https://marketplace.visualstudio.com/items?itemName=alygin.vscode-tlaplus-nightly)
[![Build Status](https://img.shields.io/github/actions/workflow/status/tlaplus/vscode-tlaplus/ci.yml?branch=master)](https://github.com/tlaplus/vscode-tlaplus/actions?query=workflow%3ACI) [![VS Code extension version](https://img.shields.io/visual-studio-marketplace/i/tlaplus-lang?color=blue&label=Stable%20Release&style=flat-square)](https://marketplace.visualstudio.com/items?itemName=tlaplus-lang) [![VS Code extension version nightly](https://img.shields.io/visual-studio-marketplace/i/tlaplus-lang?color=blue&label=Nightly%20Build&style=flat-square)](https://marketplace.visualstudio.com/items?itemName=tlaplus-lang)

This extension adds support for the [TLA<sup>+</sup> formal specification language](http://research.microsoft.com/en-us/um/people/lamport/tla/tla.html) to VS Code. It also supports running the TLC model checker on TLA<sup>+</sup> specifications.

Expand Down
8 changes: 4 additions & 4 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

16 changes: 8 additions & 8 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
{
"name": "vscode-tlaplus",
"displayName": "TLA+",
"version": "1.6.0",
"name": "tlaplus-lang",
"displayName": "TLA+ (Temporal Logic of Actions)",
"version": "1.7.0",
"description": "TLA+ language support",
"publisher": "alygin",
"publisher": "tlaplus-lang",
"license": "MIT",
"author": {
"name": "Andrew Lygin"
"name": "TLA+ Community"
},
"engines": {
"vscode": "^1.82.0"
Expand All @@ -20,10 +20,10 @@
],
"repository": {
"type": "git",
"url": "https://github.com/alygin/vscode-tlaplus.git"
"url": "https://github.com/tlaplus/vscode-tlaplus.git"
},
"bugs": {
"url": "https://github.com/alygin/vscode-tlaplus/issues"
"url": "https://github.com/tlaplus/vscode-tlaplus/issues"
},
"icon": "resources/images/tlaplus.png",
"keywords": [
Expand Down Expand Up @@ -334,7 +334,7 @@
"type": "string",
"scope": "window",
"default": "",
"markdownDescription": "Java options to use when running TLA+ tools. [How it works.](https://github.com/alygin/vscode-tlaplus/wiki/Java-Options)",
"markdownDescription": "Java options to use when running TLA+ tools. [How it works.](https://github.com/tlaplus/vscode-tlaplus/wiki/Java-Options)",
"maxLength": 1000
},
"tlaplus.pluscal.options": {
Expand Down
2 changes: 1 addition & 1 deletion src/commands/checkModel.ts
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ export async function checkModelCustom(
return;
}
// Accept .tla files here because TLC configs and TLA+ modules can share the same file:
// https://github.com/alygin/vscode-tlaplus/issues/220
// https://github.com/tlaplus/vscode-tlaplus/issues/220
const configFiles = await listFiles(path.dirname(doc.uri.fsPath),
(fName) => fName.endsWith('.cfg') || fName.endsWith('.tla'));
configFiles.sort();
Expand Down
2 changes: 1 addition & 1 deletion src/debugger/debugging.ts
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ export async function checkAndDebugSpecCustom(
return;
}
// Accept .tla files here because TLC configs and TLA+ modules can share the same file:
// https://github.com/alygin/vscode-tlaplus/issues/220
// https://github.com/tlaplus/vscode-tlaplus/issues/220
const configFiles = await listFiles(path.dirname(targetResource.fsPath),
(fName) => fName.endsWith('.cfg') || fName.endsWith('.tla'));
configFiles.sort();
Expand Down
4 changes: 2 additions & 2 deletions src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ import { ModuleSearchPathsTreeDataProvider } from './panels/moduleSearchPathsTre

const TLAPLUS_FILE_SELECTOR: vscode.DocumentSelector = { scheme: 'file', language: LANG_TLAPLUS };
const TLAPLUS_CFG_FILE_SELECTOR: vscode.DocumentSelector = { scheme: 'file', language: LANG_TLAPLUS_CFG };
const CHANGELOG_URL = vscode.Uri.parse('https://github.com/alygin/vscode-tlaplus/blob/master/CHANGELOG.md#change-log');
const CHANGELOG_URL = vscode.Uri.parse('https://github.com/tlaplus/vscode-tlaplus/blob/master/CHANGELOG.md#change-log');

const tlaDocInfos = new TlaDocumentInfos();

Expand Down Expand Up @@ -150,7 +150,7 @@ export function activate(context: vscode.ExtensionContext): void {
// 393ee2b2443e270bacd9f11fa219c39a88fc987d/src/extension.ts#L63-L84
// Also see wordPattern in tlaplus-lang-config.json that drops "@"
// and "'" compared to VSCode's standard wordPattern.
// https://github.com/alygin/vscode-tlaplus/issues/200
// https://github.com/tlaplus/vscode-tlaplus/issues/200
provideEvaluatableExpression(document: vscode.TextDocument, position: vscode.Position):
vscode.ProviderResult<vscode.EvaluatableExpression> {
const wordRange = document.getWordRangeAtPosition(position);
Expand Down
2 changes: 1 addition & 1 deletion src/tla2tools.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import { ToolOutputChannel } from './outputChannels';
import { JavaVersionParser } from './parsers/javaVersion';

// CFG_EXTENSION can be used to fetch all the settings for this extension
const CFG_EXTENSION = '@ext:alygin.vscode-tlaplus';
const CFG_EXTENSION = '@ext:tlaplus-lang';

const CFG_JAVA_HOME = 'tlaplus.java.home';
const CFG_JAVA_OPTIONS = 'tlaplus.java.options';
Expand Down
2 changes: 1 addition & 1 deletion tests/suite/parsers/tlc.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -405,7 +405,7 @@ suite('TLC Output Parser Test Suite', () => {
});

test('Handles no-line-break message switch', () => {
// https://github.com/alygin/vscode-tlaplus/issues/47
// https://github.com/tlaplus/vscode-tlaplus/issues/47
return assertOutput('no-line-break-switch.out', TEST_SPEC_FILES,
new CheckResultBuilder('no-line-break-switch.out', CheckState.Success, CheckStatus.Finished)
.addDColFilePath('/Users/bob/example.tla')
Expand Down

0 comments on commit 8f5ead8

Please sign in to comment.