aboutsummaryrefslogtreecommitdiffstats
path: root/scripts
diff options
context:
space:
mode:
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/build_emscripten.sh2
-rwxr-xr-xscripts/install_deps.sh47
-rwxr-xr-xscripts/release_ppa.sh4
-rwxr-xr-xscripts/travis-emscripten/publish_binary.sh7
4 files changed, 55 insertions, 5 deletions
diff --git a/scripts/build_emscripten.sh b/scripts/build_emscripten.sh
index da2c7df3..fe7ea11d 100755
--- a/scripts/build_emscripten.sh
+++ b/scripts/build_emscripten.sh
@@ -29,7 +29,7 @@
set -e
if [[ "$OSTYPE" != "darwin"* ]]; then
- date -u +"nightly.%Y.%m.%d" > prerelease.txt
+ date -u +"nightly.%Y.%-m.%-d" > prerelease.txt
./scripts/travis-emscripten/install_deps.sh
docker run -v $(pwd):/src trzeci/emscripten:sdk-tag-1.35.4-64bit ./scripts/travis-emscripten/build_emscripten.sh
fi
diff --git a/scripts/install_deps.sh b/scripts/install_deps.sh
index 7c8523a8..334c62d4 100755
--- a/scripts/install_deps.sh
+++ b/scripts/install_deps.sh
@@ -56,6 +56,8 @@ detect_linux_distro() {
elif [ -f /etc/os-release ]; then
# extract 'foo' from NAME=foo, only on the line with NAME=foo
DISTRO=$(sed -n -e 's/^NAME="\(.*\)\"/\1/p' /etc/os-release)
+ elif [ -f /etc/centos-release ]; then
+ DISTRO=CentOS
else
DISTRO=''
fi
@@ -329,6 +331,51 @@ case $(uname -s) in
sudo apt-get -y install eth
;;
+
+#------------------------------------------------------------------------------
+# CentOS
+# CentOS needs some more testing. This is the general idea of packages
+# needed, but some tweaking/improvements can definitely happen
+#------------------------------------------------------------------------------
+ CentOS)
+ read -p "This script will heavily modify your system in order to allow for compilation of Solidity. Are you sure? [Y/N]" -n 1 -r
+ if [[ $REPLY =~ ^[Yy]$ ]]; then
+ # Make Sure we have the EPEL repos
+ sudo yum -y install epel-release
+ # Get g++ 4.8
+ sudo rpm --import http://ftp.scientificlinux.org/linux/scientific/5x/x86_64/RPM-GPG-KEYs/RPM-GPG-KEY-cern
+ wget -O /etc/yum.repos.d/slc6-devtoolset.repo http://linuxsoft.cern.ch/cern/devtoolset/slc6-devtoolset.repo
+ sudo yum -y install devtoolset-2-gcc devtoolset-2-gcc-c++ devtoolset-2-binutils
+
+ # Enable the devtoolset2 usage so global gcc/g++ become the 4.8 one.
+ # As per https://gist.github.com/stephenturner/e3bc5cfacc2dc67eca8b, what you should do afterwards is
+ # to add this line:
+ # source /opt/rh/devtoolset-2/enable
+ # to your bashrc so that this happens automatically at login
+ scl enable devtoolset-2 bash
+
+ # Get cmake
+ sudo yum -y remove cmake
+ sudo yum -y install cmake3
+ sudo ln -s /usr/bin/cmake3 /usr/bin/cmake
+
+ # Get latest boost thanks to this guy: http://vicendominguez.blogspot.de/2014/04/boost-c-library-rpm-packages-for-centos.html
+ sudo yum -y remove boost-devel
+ sudo wget http://repo.enetres.net/enetres.repo -O /etc/yum.repos.d/enetres.repo
+ sudo yum install boost-devel
+
+ # And finally jsoncpp
+ sudo yum -y install jsoncpp-devel
+ else
+ echo "Aborted CentOS Solidity Dependency Installation";
+ exit 1
+ fi
+
+ ;;
+
+
+
+
*)
#------------------------------------------------------------------------------
diff --git a/scripts/release_ppa.sh b/scripts/release_ppa.sh
index 8e9dc282..6a30faf5 100755
--- a/scripts/release_ppa.sh
+++ b/scripts/release_ppa.sh
@@ -52,9 +52,9 @@ mv solidity solc
# Determine version
cd solc
version=`grep -oP "PROJECT_VERSION \"?\K[0-9.]+(?=\")"? CMakeLists.txt`
-commithash=`git rev-parse --short HEAD`
+commithash=`git rev-parse --short=8 HEAD`
committimestamp=`git show --format=%ci HEAD | head -n 1`
-commitdate=`git show --format=%ci HEAD | head -n 1 | cut - -b1-10`
+commitdate=`git show --format=%ci HEAD | head -n 1 | cut - -b1-10 | sed -e 's/-0?/./' | sed -e 's/-0?/./'`
echo "$commithash" > commit_hash.txt
if [ $branch = develop ]
diff --git a/scripts/travis-emscripten/publish_binary.sh b/scripts/travis-emscripten/publish_binary.sh
index e89e3ce3..d372995c 100755
--- a/scripts/travis-emscripten/publish_binary.sh
+++ b/scripts/travis-emscripten/publish_binary.sh
@@ -33,8 +33,11 @@ set -e
VER=$(cat CMakeLists.txt | grep 'set(PROJECT_VERSION' | sed -e 's/.*set(PROJECT_VERSION "\(.*\)".*/\1/')
test -n "$VER"
VER="v$VER"
-COMMIT=$(git rev-parse --short HEAD)
-DATE=$(date --date="$(git log -1 --date=iso --format=%ad HEAD)" --utc +%Y.%m.%d)
+COMMIT=$(git rev-parse --short=8 HEAD)
+DATE=$(date --date="$(git log -1 --date=iso --format=%ad HEAD)" --utc +%Y.%-m.%-d)
+
+# remove leading zeros in components - they are not semver-compatible
+COMMIT=$(echo "$COMMIT" | sed -e 's/^0*//')
ENCRYPTED_KEY_VAR="encrypted_${ENCRYPTION_LABEL}_key"
ENCRYPTED_IV_VAR="encrypted_${ENCRYPTION_LABEL}_iv"