|
| 1 | +#!/usr/bin/env bash |
| 2 | + |
| 3 | +#------------------------------------------------------------------------------ |
| 4 | +# Prints the exact version string that would be used to describe a nightly |
| 5 | +# build of the compiler. |
| 6 | +# |
| 7 | +# The documentation for solidity is hosted at: |
| 8 | +# |
| 9 | +# https://solidity.readthedocs.org |
| 10 | +# |
| 11 | +# ------------------------------------------------------------------------------ |
| 12 | +# This file is part of solidity. |
| 13 | +# |
| 14 | +# solidity is free software: you can redistribute it and/or modify |
| 15 | +# it under the terms of the GNU General Public License as published by |
| 16 | +# the Free Software Foundation, either version 3 of the License, or |
| 17 | +# (at your option) any later version. |
| 18 | +# |
| 19 | +# solidity is distributed in the hope that it will be useful, |
| 20 | +# but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 21 | +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 22 | +# GNU General Public License for more details. |
| 23 | +# |
| 24 | +# You should have received a copy of the GNU General Public License |
| 25 | +# along with solidity. If not, see <http://www.gnu.org/licenses/> |
| 26 | +# |
| 27 | +# (c) 2017 solidity contributors. |
| 28 | +#------------------------------------------------------------------------------ |
| 29 | + |
| 30 | +set -e |
| 31 | + |
| 32 | +script_dir="$(dirname "$0")" |
| 33 | + |
| 34 | +solidity_version=$(${script_dir}/get_version.sh) |
| 35 | +last_commit_timestamp=$(git log -1 --date=iso --format=%ad HEAD) |
| 36 | +last_commit_date=$(date --date="$last_commit_timestamp" --utc +%Y.%-m.%-d) |
| 37 | +last_commit_hash=$(git rev-parse --short=8 HEAD) |
| 38 | + |
| 39 | +echo "v${solidity_version}-nightly.${last_commit_date}+commit.${last_commit_hash}" |
0 commit comments