Update Substrate Node build script (#786)

Co-authored-by: Tomasz Drwięga <tomasz@parity.io>
This commit is contained in:
Hernando Castano
2021-03-03 16:42:35 -05:00
committed by Bastian Köcher
parent da41afd105
commit f1553e3de9
4 changed files with 8 additions and 14 deletions
+1 -2
View File
@@ -48,9 +48,8 @@ sp-runtime = { git = "https://github.com/paritytech/substrate.git", branch = "ma
substrate-frame-rpc-system = { git = "https://github.com/paritytech/substrate.git", branch = "master" }
[build-dependencies]
build-script-utils = { package = "substrate-build-script-utils", version = "2.0" }
substrate-build-script-utils = "3.0.0"
frame-benchmarking-cli = { git = "https://github.com/paritytech/substrate.git", branch = "master" }
vergen = "3.1.0"
[features]
default = []
+3 -5
View File
@@ -14,12 +14,10 @@
// You should have received a copy of the GNU General Public License
// along with Parity Bridges Common. If not, see <http://www.gnu.org/licenses/>.
use vergen::{generate_cargo_keys, ConstantsFlags};
const ERROR_MSG: &str = "Failed to generate metadata files";
use substrate_build_script_utils::{generate_cargo_keys, rerun_if_git_head_changed};
fn main() {
generate_cargo_keys(ConstantsFlags::SHA_SHORT).expect(ERROR_MSG);
generate_cargo_keys();
build_script_utils::rerun_if_git_head_changed();
rerun_if_git_head_changed();
}
+1 -2
View File
@@ -49,9 +49,8 @@ sp-runtime = { git = "https://github.com/paritytech/substrate.git", branch = "ma
substrate-frame-rpc-system = { git = "https://github.com/paritytech/substrate.git", branch = "master" }
[build-dependencies]
build-script-utils = { package = "substrate-build-script-utils", version = "2.0" }
substrate-build-script-utils = "3.0.0"
frame-benchmarking-cli = { git = "https://github.com/paritytech/substrate.git", branch = "master" }
vergen = "3.1.0"
[features]
default = []
+3 -5
View File
@@ -14,12 +14,10 @@
// You should have received a copy of the GNU General Public License
// along with Parity Bridges Common. If not, see <http://www.gnu.org/licenses/>.
use vergen::{generate_cargo_keys, ConstantsFlags};
const ERROR_MSG: &str = "Failed to generate metadata files";
use substrate_build_script_utils::{generate_cargo_keys, rerun_if_git_head_changed};
fn main() {
generate_cargo_keys(ConstantsFlags::SHA_SHORT).expect(ERROR_MSG);
generate_cargo_keys();
build_script_utils::rerun_if_git_head_changed();
rerun_if_git_head_changed();
}