Replace env!("...") expressions am: 1697204ac1
Original change: https://android-review.googlesource.com/c/platform/external/rust/crates/protobuf-codegen/+/1484999
Change-Id: I7652094d36f432a5b80fa1cfbead585b8c495c58
diff --git a/post_update.sh b/post_update.sh
deleted file mode 100755
index 98c02de..0000000
--- a/post_update.sh
+++ /dev/null
@@ -1,17 +0,0 @@
-#!/bin/bash
-
-# $1 Path to the new version.
-# $2 Path to the old version.
-
-set -x
-set -e
-
-# replace CARGO_PKG_VERSION with version string from METADATA
-SRCFILE=src/lib.rs
-VERSION=`grep version: METADATA | sed -e 's/^.*version: *//'`
-echo "VERSION=$VERSION"
-OLDSTR='env!("CARGO_PKG_VERSION"));'
-NEWSTR="$VERSION); // ANDROID ported version"
-sed -i -e "s:$OLDSTR:$NEWSTR:" $SRCFILE
-# Make sure that sed replaced $OLDSTR with $NEWSTR
-grep "$NEWSTR" $SRCFILE > /dev/null
diff --git a/src/lib.rs b/src/lib.rs
index 6c33538..8e519d4 100644
--- a/src/lib.rs
+++ b/src/lib.rs
@@ -192,7 +192,7 @@
{
let mut w = CodeWriter::new(&mut v);
- w.write_generated_by("rust-protobuf", "2.18.0"); // ANDROID ported version
+ w.write_generated_by("rust-protobuf", "2.18.0");
w.write_line(&format!("//! Generated file from `{}`", file.get_name()));
if customize.inside_protobuf != Some(true) {
w.write_line("");