mirror of
https://github.com/nix-community/nixvim.git
synced 2025-06-21 08:35:43 +02:00
github: Re-generate the files on updates
This commit is contained in:
parent
954876bef7
commit
668894b6d3
2 changed files with 24 additions and 0 deletions
9
.github/workflows/update.yml
vendored
9
.github/workflows/update.yml
vendored
|
@ -48,3 +48,12 @@ jobs:
|
||||||
pr-title: "Update flake.lock (${{ matrix.branch }})"
|
pr-title: "Update flake.lock (${{ matrix.branch }})"
|
||||||
token: ${{ secrets.GH_TOKEN_FOR_UPDATES }}
|
token: ${{ secrets.GH_TOKEN_FOR_UPDATES }}
|
||||||
branch: "update_flake_lock_action-${{ matrix.branch }}"
|
branch: "update_flake_lock_action-${{ matrix.branch }}"
|
||||||
|
|
||||||
|
# TODO: do in one checkout + push the flake.lock update & the re-generation of the files
|
||||||
|
- name: Update autogenerated files
|
||||||
|
run: |
|
||||||
|
git checkout update_flake_lock_action-${{ matrix.branch }}
|
||||||
|
nix run .#generate-files
|
||||||
|
git add ./generated
|
||||||
|
git commit -m "generated: Update files"
|
||||||
|
git push
|
||||||
|
|
|
@ -2,6 +2,21 @@
|
||||||
perSystem =
|
perSystem =
|
||||||
{ pkgs, ... }:
|
{ pkgs, ... }:
|
||||||
{
|
{
|
||||||
|
apps.generate-files.program = pkgs.writeShellApplication {
|
||||||
|
name = "generate-files";
|
||||||
|
|
||||||
|
text = ''
|
||||||
|
repo_root=$(git rev-parse --show-toplevel)
|
||||||
|
generated_dir=$repo_root/generated
|
||||||
|
|
||||||
|
# Rust-Analyzer
|
||||||
|
nix build .#rust-analyzer-options
|
||||||
|
cat ./result >"$generated_dir"/rust-analyzer.nix
|
||||||
|
|
||||||
|
nix fmt
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
|
||||||
packages = {
|
packages = {
|
||||||
rust-analyzer-options = pkgs.callPackage ./rust-analyzer.nix { };
|
rust-analyzer-options = pkgs.callPackage ./rust-analyzer.nix { };
|
||||||
};
|
};
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue