From fb8f753d2d276575e53e8ea2e251ea4b8b50b529 Mon Sep 17 00:00:00 2001 From: Damien Elmes Date: Thu, 6 Feb 2020 10:16:50 +1000 Subject: [PATCH] update rslib version automatically --- Makefile | 2 +- rslib/Cargo.toml | 2 +- rslib/Makefile | 10 +++++++++- 3 files changed, 11 insertions(+), 3 deletions(-) diff --git a/Makefile b/Makefile index 205e46c09..a2d8a7d44 100644 --- a/Makefile +++ b/Makefile @@ -10,7 +10,7 @@ BUILDFLAGS := --release --strip RUNFLAGS := CHECKABLE_PY := pylib qt CHECKABLE_RS := rslib -DEVEL := rspy pylib qt +DEVEL := rslib rspy pylib qt .PHONY: all all: run diff --git a/rslib/Cargo.toml b/rslib/Cargo.toml index 1379b0592..2b589a0d2 100644 --- a/rslib/Cargo.toml +++ b/rslib/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "anki" -version = "0.1.0" +version = "2.1.20" # automatically updated edition = "2018" authors = ["Ankitects Pty Ltd and contributors"] license = "AGPL-3.0-or-later" diff --git a/rslib/Makefile b/rslib/Makefile index 42f822b41..cc214b075 100644 --- a/rslib/Makefile +++ b/rslib/Makefile @@ -6,7 +6,7 @@ MAKEFLAGS += --no-builtin-rules $(shell mkdir -p .build) -.PHONY: all check fix clean +.PHONY: all check fix clean develop all: check @@ -18,6 +18,8 @@ fix: clean: rm -rf .build target +develop: .build/vernum + PROTO_SOURCE := $(wildcard ../proto/*.proto) RS_SOURCE := $(wildcard src/*) ALL_SOURCE := $(RS_SOURCE) $(PROTO_SOURCE) @@ -38,3 +40,9 @@ RUST_TOOLCHAIN := $(shell cat rust-toolchain) cargo fmt -- --check cargo clippy -- -D warnings @touch $@ + +VER := $(shell cat ../meta/version) +.build/vernum: ../meta/version + sed -i.bak 's/.*automatically updated.*/version = "$(VER)" # automatically updated/' Cargo.toml + rm Cargo.toml.bak + @touch $@