Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
106 changes: 106 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,106 @@
name: Build

on:
push:
branches:
- main
pull_request:
branches:
- main
workflow_dispatch:

permissions:
contents: read

jobs:
build-test-publish:
name: .NET 10 / win-x64
runs-on: windows-latest

steps:
- name: Check out repository
uses: actions/checkout@v4
with:
fetch-depth: 0
Comment thread
coderabbitai[bot] marked this conversation as resolved.
persist-credentials: false

- name: Set up .NET 10
uses: actions/setup-dotnet@v4
with:
dotnet-version: 10.0.x

- name: Install GitVersion
shell: pwsh
run: dotnet tool install --global GitVersion.Tool

- name: Calculate version
id: version
shell: pwsh
run: |
$version = dotnet-gitversion /showvariable SemVer
if (-not $version) { throw 'GitVersion did not return a semantic version.' }
"semver=$version" >> $env:GITHUB_OUTPUT
"VERSION=$version" >> $env:GITHUB_ENV

$releaseEligible = $false
if ('${{ github.event_name }}' -eq 'push' -and '${{ github.ref }}' -eq 'refs/heads/main') {
git rev-parse --verify --quiet "refs/tags/v$version"
$releaseEligible = $LASTEXITCODE -ne 0
}
"release-eligible=$($releaseEligible.ToString().ToLowerInvariant())" >> $env:GITHUB_OUTPUT

- name: Restore
run: dotnet restore Expressif.LanguageServer.sln -r win-x64

- name: Build
run: dotnet build src/Expressif.LanguageServer/Expressif.LanguageServer.csproj --configuration Release --framework net10.0 --runtime win-x64 --no-restore --nologo -p:Version=${{ steps.version.outputs.semver }}

- name: Test core services
run: dotnet test src/Expressif.LanguageServer.Core.Tests/Expressif.LanguageServer.Core.Tests.csproj --configuration Release --framework net10.0 --runtime win-x64 --no-restore --nologo

- name: Publish self-contained application
run: dotnet publish src/Expressif.LanguageServer/Expressif.LanguageServer.csproj --configuration Release --framework net10.0 --runtime win-x64 --self-contained true --no-restore --nologo -p:Version=${{ steps.version.outputs.semver }} --output artifacts/publish

- name: Create release archive
shell: pwsh
run: |
$archive = "artifacts/Expressif-LanguageServer-$env:VERSION-net10.0-win-x64.zip"
Compress-Archive -Path 'artifacts/publish/*' -DestinationPath $archive

- name: Upload release candidate
if: steps.version.outputs.release-eligible == 'true'
uses: actions/upload-artifact@v4
with:
name: release-candidate
path: artifacts/Expressif-LanguageServer-${{ steps.version.outputs.semver }}-net10.0-win-x64.zip
if-no-files-found: error
retention-days: 1

outputs:
version: ${{ steps.version.outputs.semver }}
release-eligible: ${{ steps.version.outputs.release-eligible }}

release:
name: GitHub Release
needs: build-test-publish
if: needs.build-test-publish.outputs.release-eligible == 'true'
runs-on: windows-latest
permissions:
contents: write

steps:
- name: Download release candidate
uses: actions/download-artifact@v4
with:
name: release-candidate
path: artifacts

- name: Tag and publish GitHub Release
shell: pwsh
env:
GH_TOKEN: ${{ github.token }}
VERSION: ${{ needs.build-test-publish.outputs.version }}
run: |
$tag = "v$env:VERSION"
$archive = "artifacts/Expressif-LanguageServer-$env:VERSION-net10.0-win-x64.zip"
gh release create $tag $archive --repo '${{ github.repository }}' --target '${{ github.sha }}' --title $tag --generate-notes
7 changes: 0 additions & 7 deletions Dockerfile

This file was deleted.

5 changes: 2 additions & 3 deletions Expressif.LanguageServer.sln
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Expressif.LanguageServer.Co
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Expressif.LanguageServer.Core.Tests", "src\Expressif.LanguageServer.Core.Tests\Expressif.LanguageServer.Core.Tests.csproj", "{E415C952-77C3-4B9C-B725-7D85E30FD18F}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Expressif.LanguageServer.Cli", "src\Expressif.LanguageServer.Cli\Expressif.LanguageServer.Cli.csproj", "{32DB1358-0491-40D0-83B8-4862504AE85B}"
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Expressif.LanguageServer", "src\Expressif.LanguageServer\Expressif.LanguageServer.csproj", "{32DB1358-0491-40D0-83B8-4862504AE85B}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Expressif.LanguageServer.Cli.Tests", "src\Expressif.LanguageServer.Cli.Tests\Expressif.LanguageServer.Cli.Tests.csproj", "{6B4E70A9-7F05-4DA5-8E85-7A72FD34C8C8}"
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Expressif.LanguageServer.Tests", "src\Expressif.LanguageServer.Tests\Expressif.LanguageServer.Tests.csproj", "{6B4E70A9-7F05-4DA5-8E85-7A72FD34C8C8}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{C923A152-4091-48BE-A984-686FF5E4ACCC}"
ProjectSection(SolutionItems) = preProject
Expand All @@ -18,7 +18,6 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Build", "Build", "{95E83BA6-B535-4D56-B06A-D00249A4EF00}"
ProjectSection(SolutionItems) = preProject
appveyor.yml = appveyor.yml
.github\conventional_commits_labels.json = .github\conventional_commits_labels.json
.github\dependabot.yml = .github\dependabot.yml
Directory.Build.props = Directory.Build.props
Expand Down
6 changes: 3 additions & 3 deletions GitVersion.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,16 @@ strategies:
- TaggedCommit
- Mainline

major-version-bump-message: "^(feat|fix|perf|revert)(\\([\\w\\s-]*\\))?(!:|:.*\\n\\n((.+\\n)+\\n)?BREAKING CHANGE:\\s.+)"
major-version-bump-message: "^(build|feat|fix|perf)(\\([\\w\\s-]*\\))?(!:|:.*\\n\\n((.+\\n)+\\n)?BREAKING CHANGE:\\s.+)"
minor-version-bump-message: "^(feat)(\\([\\w\\s-]*\\))?:|\\+semver:\\s?(feature|minor)"
patch-version-bump-message: "^(chore|fix|perf|refactor|revert|build|ci|style)(\\([\\w\\s-]*\\))?:"
patch-version-bump-message: "^(build|fix|perf)(\\([\\w\\s-]*\\))?:"
no-bump-message: "\\+semver:\\s?(none|skip)"
commit-message-incrementing: Enabled
branches:
main:
regex: ^main$
is-main-branch: true
increment: Patch
increment: None
mode: ContinuousDeployment
feature:
label: beta.{BranchName}
Expand Down
107 changes: 4 additions & 103 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,15 +15,14 @@ Transform your structured YAML, JSON, XML, CSV or FrontMatter data into beautifu
**Social media:** [![website](https://img.shields.io/badge/website-seddryck.github.io/Expressif.LanguageServer-fe762d.svg)](https://seddryck.github.io/Expressif.LanguageServer)
[![twitter badge](https://img.shields.io/badge/twitter%20Expressif.LanguageServer-@Seddryck-blue.svg?style=flat&logo=twitter)](https://twitter.com/Seddryck)

**Releases:** [![GitHub releases](https://img.shields.io/github/v/release/seddryck/expressif.LanguageServer?label=GitHub%20releases)](https://github.com/seddryck/expressif.LanguageServer/releases/latest)
[![nuget](https://img.shields.io/nuget/v/Expressif.LanguageServer-cli.svg)](https://www.nuget.org/packages/Expressif.LanguageServer-cli/) [![Docker Image Version](https://img.shields.io/docker/v/seddryck/expressif.LanguageServer?label=docker%20hub&color=0db7ed)](https://hub.docker.com/repository/docker/seddryck/expressif.LanguageServer/) [![GitHub Release Date](https://img.shields.io/github/release-date/seddryck/Expressif.LanguageServer.svg)](https://github.com/Seddryck/Expressif.LanguageServer/releases/latest) [![licence badge](https://img.shields.io/badge/License-Apache%202.0-yellow.svg)](https://github.com/Seddryck/Expressif.LanguageServer/blob/master/LICENSE)
**Releases:** [![GitHub releases](https://img.shields.io/github/v/release/seddryck/expressif.LanguageServer?label=GitHub%20releases)](https://github.com/seddryck/expressif.LanguageServer/releases/latest)
[![GitHub Release Date](https://img.shields.io/github/release-date/seddryck/Expressif.LanguageServer.svg)](https://github.com/Seddryck/Expressif.LanguageServer/releases/latest) [![licence badge](https://img.shields.io/badge/License-Apache%202.0-yellow.svg)](https://github.com/Seddryck/Expressif.LanguageServer/blob/master/LICENSE)

**Dev. activity:** [![GitHub last commit](https://img.shields.io/github/last-commit/Seddryck/Expressif.LanguageServer.svg)](https://github.com/Seddryck/Expressif.LanguageServer/commits)
![Still maintained](https://img.shields.io/maintenance/yes/2025.svg)
![GitHub commit activity](https://img.shields.io/github/commit-activity/y/Seddryck/Expressif.LanguageServer)

**Continuous integration builds:** [![Build status](https://ci.appveyor.com/api/projects/status/na3dklqjsuv1lbfv?svg=true)](https://ci.appveyor.com/project/Seddryck/Expressif.LanguageServer/)
[![Tests](https://img.shields.io/appveyor/tests/seddryck/Expressif.LanguageServer.svg)](https://ci.appveyor.com/project/Seddryck/Expressif.LanguageServer/build/tests)
**Continuous integration builds:** [![Build](https://github.com/Seddryck/Expressif.LanguageServer/actions/workflows/build.yml/badge.svg)](https://github.com/Seddryck/Expressif.LanguageServer/actions/workflows/build.yml)
[![CodeFactor](https://www.codefactor.io/repository/github/seddryck/Expressif.LanguageServer/badge)](https://www.codefactor.io/repository/github/seddryck/Expressif.LanguageServer)
[![codecov](https://codecov.io/github/Seddryck/Expressif.LanguageServer/branch/main/graph/badge.svg?token=YRA8IRIJYV)](https://codecov.io/github/Seddryck/Expressif.LanguageServer)
<!-- [![FOSSA Status](https://app.fossa.com/api/projects/git%2Bgithub.com%2FSeddryck%2FExpressif.LanguageServer.svg?type=shield)](https://app.fossa.com/projects/git%2Bgithub.com%2FSeddryck%2FExpressif.LanguageServer?ref=badge_shield) -->
Expand All @@ -34,104 +33,6 @@ Transform your structured YAML, JSON, XML, CSV or FrontMatter data into beautifu

## Installing

### Install as a .NET global tool

A .NET global tool is a console application that you can install and run from any directory on your machine. Here’s a guide on how to perform a global installation of a .NET tool:

#### Prerequisites
Before installing a .NET global tool, you must have the .NET SDK installed on your machine. You can check if it's installed by running the following command in your terminal or Command Prompt:

```bash
dotnet --version
```
If .NET is not installed, download it from [Microsoft's official website](https://dotnet.microsoft.com/download/dotnet).

#### Install a .NET Global Tool
To install a .NET global tool, you use the dotnet tool install command. This command installs a tool for all users globally on your system.

```bash
dotnet tool install -g Expressif.LanguageServer-cli
```

`-g`: This flag tells the dotnet command to install the tool globally.

#### Verify Installation

After installing the tool, you can verify that it's available globally by running it from any directory.

```bash
expressif.LanguageServer --version
```

This command will display the installed tool’s version if the installation was successful.

#### Update a .NET Global Tool

To update a globally installed .NET tool, use the dotnet tool update command:

```bash
dotnet tool update -g Expressif.LanguageServer-cli
```

### Install from Docker

#### Prerequisites

**Docker Installed**: Ensure that Docker is installed and running on your system. You can download Docker from Docker's official site.

#### Pulling the Docker Image

A pre-built Docker image is available on Docker Hub, you can pull it using the following command:

```powershell
docker pull seddryck/expressif.LanguageServer:latest
```

#### Running Expressif.LanguageServer from Docker

Once you have the Docker image, you can run Expressif.LanguageServer using Docker in PowerShell.

###### Basic Command

<sub>CMD:</sub>
```CMD
docker run --rm -v %cd%:/files expressif.LanguageServer -t <template-file> -s <source-file> -o <output-file>
```

<sub>PowerShell:</sub>
```powershell
docker run --rm -v ${pwd}:/files expressif.LanguageServer -t <template-file> -s <source-file> -o <output-file>
```

- `--rm`: Automatically removes the container after it finishes executing.
- `-v ${pwd}:/files`: Mounts the current directory (`${pwd}` in PowerShell or Bash, `%cd%` in CMD) to /files inside the Docker container, so Expressif.LanguageServer can access your local files.
- `-t <template-file>`: Specifies the path to the template file inside the /files directory.
- `-s <source-file>`: Specifies the path to the source file (YAML, JSON, or XML).
- `-o <output-file>`: Specifies the path to the output file that Expressif.LanguageServer will generate. If omitted, it will display the result on the host console.

##### Example Workflow:

1. Prepare the Template and Source Files:

- Make sure your template and source files are correctly formatted and saved in the correct directory. For example:
- `./templates/template-01.hbs`
- `./data/data.json`
2. Run Expressif.LanguageServer: Use the following command to generate templated output:

```powershell
docker run --rm -v ${pwd}:/files expressif.LanguageServer -t /files/templates/template-01.hbs -s /files/data/data.json -o /files/output/output.txt
```

3. Access the Output: The output file will be generated in ./output/output.txt on your local machine after the Docker container finishes execution.

#### Updating Expressif.LanguageServer

To update to the latest version of Expressif.LanguageServer, either pull the new Docker image

```powershell
docker pull seddryck/expressif.LanguageServer:latest
```

### Install from GitHub Releases

#### Step 1: Download the ZIP from the GitHub Release
Expand Down Expand Up @@ -167,7 +68,7 @@ To run the executable from any location in the command line, you need to add its
### Step 4: Verify Installation

1. Open **Command Prompt** (CMD).
2. Type the name of the executable (e.g., `expressif.LanguageServer.exe`) and hit Enter.
2. Type `Expressif-LanguageServer.exe` and hit Enter.
3. If everything is set up correctly, the program should run.

## QuickStart
Expand Down
Loading
Loading