| 1 | #!/usr/bin/env bash |
| 2 | # |
| 3 | # Copyright 2024 The Fuchsia Authors |
| 4 | # |
| 5 | # Licensed under a BSD-style license <LICENSE-BSD>, Apache License, Version 2.0 |
| 6 | # <LICENSE-APACHE or https://www.apache.org/licenses/LICENSE-2.0>, or the MIT |
| 7 | # license <LICENSE-MIT or https://opensource.org/licenses/MIT>, at your option. |
| 8 | # This file may not be copied, modified, or distributed except according to |
| 9 | # those terms. |
| 10 | |
| 11 | set -e |
| 12 | |
| 13 | if [ $# -ne 1 ]; then |
| 14 | echo "Usage: $0 <version>" >&2 |
| 15 | exit 1 |
| 16 | fi |
| 17 | |
| 18 | VERSION="$1" |
| 19 | |
| 20 | sed -i -e "s/^zerocopy-derive = { version = \"=[0-9a-zA-Z\.-]*\"/zerocopy-derive = { version = \"=$VERSION\"/" Cargo.toml |
| 21 | sed -i -e "s/^version = \"[0-9a-zA-Z\.-]*\"/version = \"$VERSION\"/" Cargo.toml zerocopy-derive/Cargo.toml |