This commit also adds the flake version to the justfile's version check.
This commit is contained in:
parent
442fd5c30f
commit
014a30f3f6
3 changed files with 27 additions and 21 deletions
|
|
@ -16,10 +16,13 @@ jobs:
|
||||||
container:
|
container:
|
||||||
image: rust:slim
|
image: rust:slim
|
||||||
steps:
|
steps:
|
||||||
- name: Install action dependencies
|
- name: Set up action dependencies
|
||||||
run: |
|
run: |
|
||||||
apt-get install --no-install-recommends --update -y \
|
apt-get install --no-install-recommends --update -y \
|
||||||
nodejs git nix
|
nodejs git nix
|
||||||
|
echo experimental-features = nix-command flakes >> /etc/nix/nix.conf
|
||||||
|
echo 'export PATH=$PATH:$HOME/.nix-profile/bin' >> /etc/profile
|
||||||
|
nix profile install nixpkgs#just # trixie is on nix 2.26
|
||||||
|
|
||||||
- name: Checkout code
|
- name: Checkout code
|
||||||
uses: actions/checkout@v6
|
uses: actions/checkout@v6
|
||||||
|
|
@ -48,8 +51,5 @@ jobs:
|
||||||
|
|
||||||
- name: Assess
|
- name: Assess
|
||||||
run: |
|
run: |
|
||||||
ENV_PATH=$PATH su ci -c "
|
command -v just
|
||||||
nix --experimental-features 'nix-command flakes' \
|
just ci-nix "$PATH" verify
|
||||||
develop path:$PWD \
|
|
||||||
-c just -f $PWD/.justfile verify
|
|
||||||
"
|
|
||||||
|
|
|
||||||
34
.justfile
34
.justfile
|
|
@ -383,17 +383,15 @@ alias v := verify
|
||||||
[script, group: 'assess']
|
[script, group: 'assess']
|
||||||
[arg("remote", long="remote", short="r", value="true")]
|
[arg("remote", long="remote", short="r", value="true")]
|
||||||
version-assess remote="false": update
|
version-assess remote="false": update
|
||||||
last_remote_tag=$(
|
echo "Local: {{ last_local_tag }}"
|
||||||
git ls-remote --tags --sort=-creatordate origin |
|
echo "Remote: {{ last_remote_tag }}"
|
||||||
head -n 1 | tr -d v | cut -d / -f 3
|
echo "Manifest: {{ manifest_version }}"
|
||||||
)
|
echo "Lockfile: {{ lockfile_version }}"
|
||||||
printf 'Local: %s\nRemote: %s\nManifest: %s\nLockfile: %s\n' \
|
echo "Flake: {{ flake_version }}"
|
||||||
"{{ last_local_tag }}" \
|
|
||||||
"$last_remote_tag" \
|
|
||||||
"{{ manifest_version }}" \
|
|
||||||
"{{ lockfile_version }}"
|
|
||||||
test "{{ last_local_tag }}" = "{{ lockfile_version }}"
|
test "{{ last_local_tag }}" = "{{ lockfile_version }}"
|
||||||
test "{{ last_local_tag }}" = "{{ manifest_version }}"
|
test "{{ last_local_tag }}" = "{{ manifest_version }}"
|
||||||
|
test "{{ last_local_tag }}" = "{{ flake_version }}"
|
||||||
if {{ if remote == "true" { "true" } else { "false" } }}; then
|
if {{ if remote == "true" { "true" } else { "false" } }}; then
|
||||||
test "{{ last_local_tag }}" = "$last_remote_tag"
|
test "{{ last_local_tag }}" = "$last_remote_tag"
|
||||||
fi
|
fi
|
||||||
|
|
@ -529,12 +527,15 @@ alias ch := choose
|
||||||
|
|
||||||
[script, private]
|
[script, private]
|
||||||
ci recipes:
|
ci recipes:
|
||||||
ENV_PATH="$PATH" su ci -c "{{ just_cmd }} -f '{{ justfile() }}' {{ recipes }}"
|
su ci -c "{{ just_cmd }} -f '{{ justfile() }}' {{ recipes }}"
|
||||||
|
|
||||||
[script, private]
|
[script, private]
|
||||||
ci-nix recipes:
|
ci-nix path recipes:
|
||||||
ENV_PATH="$PATH" su ci -c "nix develop --command \
|
ENV_PATH="{{ path }}" su ci -c "
|
||||||
{{ just_cmd }} -f '{{ justfile() }}' {{ recipes }}"
|
nix --experimental-features 'nix-command flakes' \
|
||||||
|
develop "path:{{ justfile_directory() }}" --command \
|
||||||
|
{{ just_cmd }} -f '{{ justfile() }}' {{ recipes }}
|
||||||
|
"
|
||||||
|
|
||||||
[private]
|
[private]
|
||||||
smoke:
|
smoke:
|
||||||
|
|
@ -555,11 +556,16 @@ watch_cmd := "watchexec -qc -r -e rs,toml,html,css --color always -- "
|
||||||
cover_cmd := 'cargo llvm-cov --color always --ignore-filename-regex "main\.rs|log\.rs"'
|
cover_cmd := 'cargo llvm-cov --color always --ignore-filename-regex "main\.rs|log\.rs"'
|
||||||
|
|
||||||
last_local_tag := `git tag --sort=-creatordate | head -n 1 | tr -d v`
|
last_local_tag := `git tag --sort=-creatordate | head -n 1 | tr -d v`
|
||||||
|
last_remote_tag := ```
|
||||||
|
git ls-remote --tags --sort=-creatordate origin |
|
||||||
|
head -n 1 | tr -d v | cut -d / -f 3
|
||||||
|
```
|
||||||
manifest_version := `grep "^version" Cargo.toml | cut -d \" -f 2`
|
manifest_version := `grep "^version" Cargo.toml | cut -d \" -f 2`
|
||||||
lockfile_version := ```
|
lockfile_version := ```
|
||||||
grep -A 1 'name = "en"' Cargo.lock \
|
grep -A 1 'name = "en"' Cargo.lock \
|
||||||
| grep version | cut -d '"' -f 2
|
| grep version | cut -d '"' -f 2
|
||||||
```
|
```
|
||||||
|
flake_version := `grep '^ *version = "' flake.nix | cut -d \" -f 2`
|
||||||
|
|
||||||
## OPTIONS
|
## OPTIONS
|
||||||
set unstable
|
set unstable
|
||||||
|
|
|
||||||
|
|
@ -5,7 +5,7 @@
|
||||||
|
|
||||||
outputs = { nixpkgs, self }: let
|
outputs = { nixpkgs, self }: let
|
||||||
name = "en";
|
name = "en";
|
||||||
version = "0.4.0";
|
version = "0.4.0-alpha";
|
||||||
|
|
||||||
supportedSystems = [
|
supportedSystems = [
|
||||||
"x86_64-linux"
|
"x86_64-linux"
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue