From de6aa6c97ebcac8249795c475cb99ad9b97b96a7 Mon Sep 17 00:00:00 2001 From: Alex Crichton Date: Thu, 30 Aug 2018 13:26:07 -0700 Subject: [PATCH] Automatically change the schema version on all publishes Closes #773 --- crates/shared/src/lib.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/crates/shared/src/lib.rs b/crates/shared/src/lib.rs index 16ffd964..86591e9d 100644 --- a/crates/shared/src/lib.rs +++ b/crates/shared/src/lib.rs @@ -3,7 +3,9 @@ #[macro_use] extern crate serde_derive; -pub const SCHEMA_VERSION: &str = "8"; +// The schema is so unstable right now we just force it to change whenever this +// package's version changes, which happens on all publishes. +pub const SCHEMA_VERSION: &str = env!("CARGO_PKG_VERSION"); #[derive(Deserialize)] pub struct ProgramOnlySchema {