aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChih-Hung Hsieh <chh@google.com>2020-09-30 20:11:23 -0700
committerChih-Hung Hsieh <chh@google.com>2020-09-30 20:11:23 -0700
commit8cffafec6b8511427ff5739853bd9144d9c222db (patch)
treeb521090c9bf79c44d15223de53dd501a2fc3790e
parent8cb3e542b54a3ce5d869ede4c64c0624c704c25d (diff)
downloadserde-8cffafec6b8511427ff5739853bd9144d9c222db.tar.gz
Add post_update.sh to fix up Android.bpplatform-tools-30.0.5
* Use the updater.sh update --refresh --keep_date command to check and fix local changes. * Also fix non-standard line format in METADATA. Test: tools/external_updater/updater.sh update --refresh --keep_date rust/crates/serde Change-Id: I796bb2fc1e9db4a16c56aef4a560e0dcea17c8a1
-rw-r--r--METADATA11
-rwxr-xr-xpost_update.sh15
2 files changed, 21 insertions, 5 deletions
diff --git a/METADATA b/METADATA
index 2ca368d..13e5248 100644
--- a/METADATA
+++ b/METADATA
@@ -1,7 +1,5 @@
name: "serde"
-description:
- "A generic serialization/deserialization framework"
-
+description: "A generic serialization/deserialization framework"
third_party {
url {
type: HOMEPAGE
@@ -12,7 +10,10 @@ third_party {
value: "https://static.crates.io/crates/serde/serde-1.0.115.crate"
}
version: "1.0.115"
- last_upgrade_date { year: 2020 month: 8 day: 21 }
license_type: NOTICE
+ last_upgrade_date {
+ year: 2020
+ month: 8
+ day: 21
+ }
}
-
diff --git a/post_update.sh b/post_update.sh
new file mode 100755
index 0000000..7de4f29
--- /dev/null
+++ b/post_update.sh
@@ -0,0 +1,15 @@
+#!/bin/bash
+
+# $1 Path to the new version.
+# $2 Path to the old version.
+
+set -x
+set -e
+
+# work around missing std_atomic64 on arm/arm64
+SRCFILE=Android.bp
+OLDSTR='"--cfg std_atomic64",'
+NEWSTR='// "--cfg std_atomic64", // not for arm/arm64'
+sed -i -e "s:$OLDSTR:$NEWSTR:" $SRCFILE
+# Make sure that sed replaced $OLDSTR with $NEWSTR
+grep "$NEWSTR" $SRCFILE > /dev/null