dist: add version and book (#1965)
This commit is contained in:
parent
bd169732c8
commit
f3254fd754
|
@ -2,7 +2,7 @@
|
||||||
|
|
||||||
This binary distribution was created from https://github.com/status-im/nimbus-eth2
|
This binary distribution was created from https://github.com/status-im/nimbus-eth2
|
||||||
|
|
||||||
Tarball naming scheme: "nimbus-eth2\_Linux\_amd64\_<GIT COMMIT>\_<YYYYMMDDHHMMSS>.tar.gz" (the date is in UTC).
|
Tarball naming scheme: "nimbus-eth2\_Linux\_amd64\_<VERSION>\_<GIT COMMIT>\_<YYYYMMDDHHMMSS>.tar.gz" (the date is in UTC).
|
||||||
|
|
||||||
## Reproducing the build
|
## Reproducing the build
|
||||||
|
|
||||||
|
|
|
@ -4,20 +4,24 @@ set -e
|
||||||
|
|
||||||
cd /home/user/nimbus-eth2
|
cd /home/user/nimbus-eth2
|
||||||
|
|
||||||
PREFIX="nimbus-eth2_Linux_amd64_"
|
|
||||||
GIT_COMMIT="$(git rev-parse --short HEAD)"
|
|
||||||
DIR="${PREFIX}${GIT_COMMIT}_$(date --utc +'%Y%m%d%H%M%S')"
|
|
||||||
DIST_PATH="dist/${DIR}"
|
|
||||||
BINARIES="beacon_node medalla_beacon_node"
|
BINARIES="beacon_node medalla_beacon_node"
|
||||||
|
|
||||||
# delete old artefacts
|
|
||||||
rm -rf "dist/${PREFIX}"*.tar.gz
|
|
||||||
|
|
||||||
mkdir -p "${DIST_PATH}"
|
|
||||||
|
|
||||||
# we need to build everything against libraries available inside this container, including the Nim compiler
|
# we need to build everything against libraries available inside this container, including the Nim compiler
|
||||||
make clean
|
make clean
|
||||||
make -j$(nproc) LOG_LEVEL="TRACE" NIMFLAGS="-d:disableMarchNative" PARTIAL_STATIC_LINKING=1 ${BINARIES}
|
make -j$(nproc) LOG_LEVEL="TRACE" NIMFLAGS="-d:disableMarchNative" PARTIAL_STATIC_LINKING=1 ${BINARIES}
|
||||||
|
|
||||||
|
# archive directory (we need the Nim compiler in here)
|
||||||
|
PREFIX="nimbus-eth2_Linux_amd64_"
|
||||||
|
GIT_COMMIT="$(git rev-parse --short HEAD)"
|
||||||
|
VERSION="$(./env.sh nim --verbosity:0 --hints:off --warnings:off scripts/print_version.nims)"
|
||||||
|
TIMESTAMP="$(date --utc +'%Y%m%d%H%M%S')"
|
||||||
|
DIR="${PREFIX}${VERSION}_${GIT_COMMIT}_${TIMESTAMP}"
|
||||||
|
DIST_PATH="dist/${DIR}"
|
||||||
|
# delete old artefacts
|
||||||
|
rm -rf "dist/${PREFIX}"*.tar.gz
|
||||||
|
mkdir -p "${DIST_PATH}"
|
||||||
|
|
||||||
|
# copy and checksum binaries, copy scripts and docs
|
||||||
for BINARY in ${BINARIES}; do
|
for BINARY in ${BINARIES}; do
|
||||||
cp -a ./build/${BINARY} "${DIST_PATH}/"
|
cp -a ./build/${BINARY} "${DIST_PATH}/"
|
||||||
cd "${DIST_PATH}"
|
cd "${DIST_PATH}"
|
||||||
|
@ -27,6 +31,7 @@ for BINARY in ${BINARIES}; do
|
||||||
done
|
done
|
||||||
sed -e "s/GIT_COMMIT/${GIT_COMMIT}/" docker/dist/README.md > "${DIST_PATH}/README.md"
|
sed -e "s/GIT_COMMIT/${GIT_COMMIT}/" docker/dist/README.md > "${DIST_PATH}/README.md"
|
||||||
cp -a scripts/makedir.sh docker/dist/run_medalla_node.sh "${DIST_PATH}/"
|
cp -a scripts/makedir.sh docker/dist/run_medalla_node.sh "${DIST_PATH}/"
|
||||||
|
cp -a docs/the_nimbus_book "${DIST_PATH}/"
|
||||||
|
|
||||||
# create the tarball
|
# create the tarball
|
||||||
cd dist
|
cd dist
|
||||||
|
|
|
@ -0,0 +1,4 @@
|
||||||
|
import ../beacon_chain/version
|
||||||
|
|
||||||
|
echo versionAsStr
|
||||||
|
|
Loading…
Reference in New Issue