Jelajahi Sumber

Revert "Embed git revision in CLI version output."

This reverts commit 459170ff096a06e370addaf107dbe0a6e08e6d31.
parazyd 3 tahun lalu
induk
melakukan
bea7596209
2 mengubah file dengan 3 tambahan dan 10 penghapusan
  1. 2 8
      Makefile
  2. 1 2
      src/lib.rs

+ 2 - 8
Makefile

@@ -11,9 +11,6 @@ CARGO = cargo +nightly
 # Uncomment this if the above is uncommented
 # Uncomment this if the above is uncommented
 #TARGET_PRFX = --target=
 #TARGET_PRFX = --target=
 
 
-# Git revision, embedded in src/lib.rs
-GIT_REV = $(shell git rev-parse --short HEAD)
-
 # Binaries to be built
 # Binaries to be built
 BINS = darkfid faucetd drk darkirc vanityaddr tau taud
 BINS = darkfid faucetd drk darkirc vanityaddr tau taud
 
 
@@ -38,10 +35,7 @@ BINDEPS = \
 
 
 all: $(BINS)
 all: $(BINS)
 
 
-rev:
-	@grep -q "$(GIT_REV)" src/lib.rs || sed -e 's/@GIT_REV@/$(GIT_REV)/' -i src/lib.rs
-
-zkas: rev $(ZKASDEPS)
+zkas: $(ZKASDEPS)
 	$(CARGO) build $(TARGET_PRFX)$(RUST_TARGET) --all-features --release --package $@
 	$(CARGO) build $(TARGET_PRFX)$(RUST_TARGET) --all-features --release --package $@
 	cp -f target/$(RUST_TARGET)/release/$@ $@
 	cp -f target/$(RUST_TARGET)/release/$@ $@
 
 
@@ -107,5 +101,5 @@ uninstall:
 		rm -f $(DESTDIR)$(PREFIX)/bin/$$i; \
 		rm -f $(DESTDIR)$(PREFIX)/bin/$$i; \
 	done;
 	done;
 
 
-.PHONY: all rev check fix fmt clippy test test-no-run cleanbin clean \
+.PHONY: all check fix fmt clippy test test-no-run cleanbin clean \
 	install uninstall contracts coverage
 	install uninstall contracts coverage

+ 1 - 2
src/lib.rs

@@ -69,10 +69,9 @@ pub const ANSI_LOGO: &str = include_str!("../contrib/darkfi.ansi");
 macro_rules! cli_desc {
 macro_rules! cli_desc {
     () => {{
     () => {{
         let desc = format!(
         let desc = format!(
-            "{} {}-{}\n{}\n{}",
+            "{} {}\n{}\n{}",
             env!("CARGO_PKG_NAME").to_string(),
             env!("CARGO_PKG_NAME").to_string(),
             env!("CARGO_PKG_VERSION").to_string(),
             env!("CARGO_PKG_VERSION").to_string(),
-            "@GIT_REV@", // Only noobs will change this
             env!("CARGO_PKG_DESCRIPTION").to_string(),
             env!("CARGO_PKG_DESCRIPTION").to_string(),
             darkfi::ANSI_LOGO,
             darkfi::ANSI_LOGO,
         );
         );