mirror of
https://github.com/Myzel394/config-lsp.git
synced 2025-06-18 23:15:26 +02:00
fix(ci-cd): Improve CI:CD
This commit is contained in:
parent
6791e391e8
commit
d7cbc9f454
9
.github/workflows/release-nightly.yaml
vendored
9
.github/workflows/release-nightly.yaml
vendored
@ -12,6 +12,15 @@ jobs:
|
|||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
|
- name: Check version in code matches flake version
|
||||||
|
shell: bash
|
||||||
|
run: |
|
||||||
|
if ! [ $(grep '// CI:CD-VERSION$' server/root-handler/handler.go | cut -d'"' -f 2) = $(nix eval --file flake.nix inputs.version | cut -d '"' -f 2) ];
|
||||||
|
then
|
||||||
|
echo "Version mismatch"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
- uses: cachix/install-nix-action@v27
|
- uses: cachix/install-nix-action@v27
|
||||||
with:
|
with:
|
||||||
github_access_token: ${{ secrets.GITHUB_TOKEN }}
|
github_access_token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
@ -9,9 +9,10 @@
|
|||||||
inputs.utils.follows = "utils";
|
inputs.utils.follows = "utils";
|
||||||
};
|
};
|
||||||
utils.url = "github:numtide/flake-utils";
|
utils.url = "github:numtide/flake-utils";
|
||||||
|
version = "0.1.0";
|
||||||
};
|
};
|
||||||
|
|
||||||
outputs = { self, nixpkgs, utils, gomod2nix }:
|
outputs = { self, nixpkgs, utils, gomod2nix, version }:
|
||||||
utils.lib.eachDefaultSystem (system:
|
utils.lib.eachDefaultSystem (system:
|
||||||
let
|
let
|
||||||
pkgs = import nixpkgs {
|
pkgs = import nixpkgs {
|
||||||
@ -30,7 +31,7 @@
|
|||||||
server = pkgs.buildGoModule {
|
server = pkgs.buildGoModule {
|
||||||
nativeBuildInputs = inputs;
|
nativeBuildInputs = inputs;
|
||||||
pname = "github.com/Myzel394/config-lsp";
|
pname = "github.com/Myzel394/config-lsp";
|
||||||
version = "v0.0.1";
|
version = version;
|
||||||
src = ./server;
|
src = ./server;
|
||||||
vendorHash = "sha256-s+sjOVvqU20+mbEFKg+RCD+dhScqSatk9eseX2IioPI";
|
vendorHash = "sha256-s+sjOVvqU20+mbEFKg+RCD+dhScqSatk9eseX2IioPI";
|
||||||
checkPhase = ''
|
checkPhase = ''
|
||||||
|
@ -9,7 +9,9 @@ import (
|
|||||||
|
|
||||||
const lsName = "config-lsp"
|
const lsName = "config-lsp"
|
||||||
|
|
||||||
var version string = "0.0.1"
|
// The comment below at the end of the line is required for the CI:CD to work.
|
||||||
|
// Do not remove it
|
||||||
|
var version = "0.1.0" // CI:CD-VERSION
|
||||||
|
|
||||||
var lspHandler protocol.Handler
|
var lspHandler protocol.Handler
|
||||||
|
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
"description": "A language server example using language services to support embedded languages",
|
"description": "A language server example using language services to support embedded languages",
|
||||||
"author": "Microsoft Corporation",
|
"author": "Microsoft Corporation",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"version": "1.0.0",
|
"version": "0.1.0",
|
||||||
"repository": {
|
"repository": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://github.com/Microsoft/vscode-extension-samples"
|
"url": "https://github.com/Microsoft/vscode-extension-samples"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user