nix: upgrade: 2.2.1 > 2.3.1

also drop toolversion scripts and functions

Signed-off-by: Jakub Sokołowski <jakub@status.im>
This commit is contained in:
Jakub Sokołowski 2019-11-21 18:41:34 +01:00
parent fe7f6c87ab
commit 261b81c8a7
No known key found for this signature in database
GPG Key ID: 4EF064D0E6D63020
7 changed files with 1 additions and 112 deletions

View File

@ -1,6 +0,0 @@
android-sdk-build-tools;28.0.1;
android-sdk;4333796;aa190cfd7299cd6a1c687355bb2764e4
nix;2.2.1;
node;10.15.0;
StatusImAppImage;20181208;
StatusIm-Windows-base-image;20181113;

View File

@ -3,14 +3,6 @@ def getVersion() {
return readFile(path).trim()
}
def getToolVersion(name) {
def version = sh(
returnStdout: true,
script: "${env.WORKSPACE}/scripts/toolversion ${name}"
).trim()
return version
}
def branchName() {
return env.GIT_BRANCH.replaceAll(/.*origin\//, '')
}

View File

@ -25,7 +25,3 @@ function program_version_exists() {
fi
$(exit 1)
}
function toolversion() {
${GIT_ROOT}/scripts/toolversion "${1}"
}

View File

@ -16,8 +16,6 @@ YELLOW='\033[1;33m'
NC='\033[0m'
PLATFORM_FOLDER="desktop/js_files"
$GIT_ROOT/scripts/run-environment-check.sh desktop
if [ ! -f package.json ] || [ $(readlink package.json) != "${PLATFORM_FOLDER}/package.json" ]; then
rm -rf node_modules

View File

@ -1,46 +0,0 @@
#!/usr/bin/env bash
RED='\033[0;31m'
GREEN='\033[0;32m'
YELLOW='\033[1;33m'
NC='\033[0m'
PLATFORM=""
_current_dir=$(cd "${BASH_SOURCE%/*}" && pwd)
source "$_current_dir/lib/setup/path-support.sh"
source_lib "packages.sh"
EXPECTED_NODE_VERSION="v$(toolversion node)" # note the 'v' in front, that is how node does versioning
EXPECTED_YARN_VERSION="$(toolversion yarn)" # note the lack of 'v' in front. inconsistent. :(
# if no arguments passed, inform user about possible ones
if [ $# -eq 0 ]; then
echo -e "${GREEN}This script should be invoked with platform argument: 'android', 'ios' or 'desktop'${NC}"
exit 1
else
PLATFORM=$1
fi
if [ -z "$IN_NIX_SHELL" ]; then
if ! program_version_exists node $EXPECTED_NODE_VERSION || ! program_version_exists yarn $EXPECTED_YARN_VERSION; then
echo -e "${YELLOW}********************************************************************************************"
echo -e "The current environment doesn't contain the expected versions of node and/or yarn"
echo -e " - node:\texpected\t${EXPECTED_NODE_VERSION}"
echo -e " \t\tfound\t\t$(node -v) ($(which node))"
echo -e " - yarn:\texpected\t${EXPECTED_YARN_VERSION}"
echo -e " \t\tfound\t\t$(yarn -v) ($(which yarn))"
echo -e "Please open another console to reload the environment."
echo -e "**********************************************************************************************${NC}"
exit 1
fi
fi
if [ "$PLATFORM" == 'ios' ] && [ "$(uname)" != "Darwin" ]; then
echo -e "${RED}iOS builds are only possible on macOS hosts${NC}"
exit 1
fi
echo -e "${GREEN}Finished!${NC}"

View File

@ -50,7 +50,7 @@ fi
setup_header "Installing requirements..."
if [ "$IN_NIX_SHELL" != 'pure' ] && ! is_nixos && ! program_exists nix; then
required_version=$(toolversion nix)
required_version="2.3.1"
NIX_INSTALLER_NO_MODIFY_PROFILE=1 bash <(curl https://nixos.org/releases/nix/nix-${required_version}/install) --no-daemon
if [ $? -eq 0 ]; then
echo -e "${YELLOW}**********************************************************************************************************"

View File

@ -1,45 +0,0 @@
#!/usr/bin/env bash
################################################################################
# This tool fetches versions and checksums of build tools from the .TOOLVERSIONS
# file in project root. This is then used by various setup scripts,
# and most importantly by Dockerfiles.
################################################################################
set -e
GIT_ROOT=$(cd "${BASH_SOURCE%/*}" && git rev-parse --show-toplevel)
TOOL_VERSIONS_FILE="${GIT_ROOT}/.TOOLVERSIONS"
usage () {
echo "Usage: toolversion [-c] <name>" >&2
echo
echo "This script extracts tooling versions from ${TOOL_VERSIONS_FILE}"
exit 0
}
# some options parsing
while getopts ":ch" opt; do
case $opt in
c) CHECKSUM=1; shift ;;
h) usage;;
\?) echo "Invalid option: -$OPTARG" >&2; exit 1;;
esac
done
# verify the main argument was given
if [[ -z "${1}" ]]; then usage; fi
NAME=${1}
getColumn () {
local value=$(awk -F';' "/^${NAME};/{print \$${1}}" "${TOOL_VERSIONS_FILE}")
[ -z "$value" ] && echo "\nUnexpected missing value for ${NAME} in ${TOOL_VERSIONS_FILE}" && exit 1
echo $value
}
if [[ $CHECKSUM ]]; then
getColumn 3
else
getColumn 2
fi