diff options
-rwxr-xr-x[-rw-r--r--] | src/anaconda/install.sh | 0 | ||||
-rwxr-xr-x[-rw-r--r--] | src/azure-cli/install.sh | 0 | ||||
-rwxr-xr-x[-rw-r--r--] | src/common/install.sh | 0 | ||||
-rwxr-xr-x[-rw-r--r--] | src/desktop-lite/install.sh | 0 | ||||
-rwxr-xr-x[-rw-r--r--] | src/docker-from-docker/install.sh | 0 | ||||
-rwxr-xr-x[-rw-r--r--] | src/docker-in-docker/install.sh | 0 | ||||
-rwxr-xr-x[-rw-r--r--] | src/dotnet/install.sh | 0 | ||||
-rwxr-xr-x[-rw-r--r--] | src/git-lfs/install.sh | 0 | ||||
-rwxr-xr-x[-rw-r--r--] | src/git/install.sh | 0 | ||||
-rwxr-xr-x[-rw-r--r--] | src/github-cli/install.sh | 0 | ||||
-rwxr-xr-x[-rw-r--r--] | src/go/install.sh | 0 | ||||
-rwxr-xr-x[-rw-r--r--] | src/hugo/install.sh | 0 | ||||
-rwxr-xr-x[-rw-r--r--] | src/java/install.sh | 0 | ||||
-rwxr-xr-x[-rw-r--r--] | src/kubectl-helm-minikube/install.sh | 0 | ||||
-rwxr-xr-x[-rw-r--r--] | src/node/install.sh | 0 | ||||
-rwxr-xr-x[-rw-r--r--] | src/php/install.sh | 0 | ||||
-rwxr-xr-x[-rw-r--r--] | src/powershell/install.sh | 0 | ||||
-rwxr-xr-x[-rw-r--r--] | src/ruby/install.sh | 0 | ||||
-rwxr-xr-x[-rw-r--r--] | src/rust/install.sh | 28 | ||||
-rwxr-xr-x[-rw-r--r--] | src/sshd/install.sh | 0 | ||||
-rwxr-xr-x[-rw-r--r--] | src/terraform/install.sh | 0 | ||||
-rwxr-xr-x[-rw-r--r--] | test/anaconda/test.sh | 0 | ||||
-rwxr-xr-x[-rw-r--r--] | test/aws-cli/test.sh | 0 | ||||
-rwxr-xr-x[-rw-r--r--] | test/azure-cli/test.sh | 0 | ||||
-rwxr-xr-x[-rw-r--r--] | test/common/test.sh | 0 | ||||
-rwxr-xr-x[-rw-r--r--] | test/desktop-lite/test.sh | 0 | ||||
-rwxr-xr-x[-rw-r--r--] | test/docker-from-docker/test.sh | 0 | ||||
-rwxr-xr-x[-rw-r--r--] | test/docker-in-docker/test.sh | 0 | ||||
-rwxr-xr-x[-rw-r--r--] | test/dotnet/test.sh | 0 | ||||
-rwxr-xr-x[-rw-r--r--] | test/git-lfs/test.sh | 0 | ||||
-rwxr-xr-x[-rw-r--r--] | test/git/test.sh | 0 | ||||
-rwxr-xr-x[-rw-r--r--] | test/github-cli/test.sh | 0 | ||||
-rwxr-xr-x[-rw-r--r--] | test/go/test.sh | 0 | ||||
-rwxr-xr-x[-rw-r--r--] | test/hugo/test.sh | 0 | ||||
-rwxr-xr-x[-rw-r--r--] | test/java/test.sh | 0 | ||||
-rwxr-xr-x[-rw-r--r--] | test/kubectl-helm-minikube/test.sh | 0 | ||||
-rwxr-xr-x[-rw-r--r--] | test/node/test.sh | 0 | ||||
-rwxr-xr-x[-rw-r--r--] | test/oryx/test.sh | 0 | ||||
-rwxr-xr-x[-rw-r--r--] | test/php/test.sh | 0 | ||||
-rwxr-xr-x[-rw-r--r--] | test/powershell/test.sh | 0 | ||||
-rwxr-xr-x[-rw-r--r--] | test/python/test.sh | 0 | ||||
-rwxr-xr-x[-rw-r--r--] | test/ruby/test.sh | 0 | ||||
-rwxr-xr-x[-rw-r--r--] | test/rust/test.sh | 0 | ||||
-rwxr-xr-x[-rw-r--r--] | test/sshd/test.sh | 0 | ||||
-rwxr-xr-x[-rw-r--r--] | test/terraform/test.sh | 0 |
45 files changed, 27 insertions, 1 deletions
diff --git a/src/anaconda/install.sh b/src/anaconda/install.sh index 750077e..750077e 100644..100755 --- a/src/anaconda/install.sh +++ b/src/anaconda/install.sh diff --git a/src/azure-cli/install.sh b/src/azure-cli/install.sh index d5a586f..d5a586f 100644..100755 --- a/src/azure-cli/install.sh +++ b/src/azure-cli/install.sh diff --git a/src/common/install.sh b/src/common/install.sh index 7edbe53..7edbe53 100644..100755 --- a/src/common/install.sh +++ b/src/common/install.sh diff --git a/src/desktop-lite/install.sh b/src/desktop-lite/install.sh index e9f74f1..e9f74f1 100644..100755 --- a/src/desktop-lite/install.sh +++ b/src/desktop-lite/install.sh diff --git a/src/docker-from-docker/install.sh b/src/docker-from-docker/install.sh index 88ad52f..88ad52f 100644..100755 --- a/src/docker-from-docker/install.sh +++ b/src/docker-from-docker/install.sh diff --git a/src/docker-in-docker/install.sh b/src/docker-in-docker/install.sh index 02dd260..02dd260 100644..100755 --- a/src/docker-in-docker/install.sh +++ b/src/docker-in-docker/install.sh diff --git a/src/dotnet/install.sh b/src/dotnet/install.sh index 3e4bfec..3e4bfec 100644..100755 --- a/src/dotnet/install.sh +++ b/src/dotnet/install.sh diff --git a/src/git-lfs/install.sh b/src/git-lfs/install.sh index e5934fa..e5934fa 100644..100755 --- a/src/git-lfs/install.sh +++ b/src/git-lfs/install.sh diff --git a/src/git/install.sh b/src/git/install.sh index 1da6500..1da6500 100644..100755 --- a/src/git/install.sh +++ b/src/git/install.sh diff --git a/src/github-cli/install.sh b/src/github-cli/install.sh index 4fea41b..4fea41b 100644..100755 --- a/src/github-cli/install.sh +++ b/src/github-cli/install.sh diff --git a/src/go/install.sh b/src/go/install.sh index e524e26..e524e26 100644..100755 --- a/src/go/install.sh +++ b/src/go/install.sh diff --git a/src/hugo/install.sh b/src/hugo/install.sh index f7ab7a2..f7ab7a2 100644..100755 --- a/src/hugo/install.sh +++ b/src/hugo/install.sh diff --git a/src/java/install.sh b/src/java/install.sh index 411fffb..411fffb 100644..100755 --- a/src/java/install.sh +++ b/src/java/install.sh diff --git a/src/kubectl-helm-minikube/install.sh b/src/kubectl-helm-minikube/install.sh index b10f578..b10f578 100644..100755 --- a/src/kubectl-helm-minikube/install.sh +++ b/src/kubectl-helm-minikube/install.sh diff --git a/src/node/install.sh b/src/node/install.sh index 7169919..7169919 100644..100755 --- a/src/node/install.sh +++ b/src/node/install.sh diff --git a/src/php/install.sh b/src/php/install.sh index 7380114..7380114 100644..100755 --- a/src/php/install.sh +++ b/src/php/install.sh diff --git a/src/powershell/install.sh b/src/powershell/install.sh index be60201..be60201 100644..100755 --- a/src/powershell/install.sh +++ b/src/powershell/install.sh diff --git a/src/ruby/install.sh b/src/ruby/install.sh index 4920287..4920287 100644..100755 --- a/src/ruby/install.sh +++ b/src/ruby/install.sh diff --git a/src/rust/install.sh b/src/rust/install.sh index be52fd3..3970bb2 100644..100755 --- a/src/rust/install.sh +++ b/src/rust/install.sh @@ -94,6 +94,25 @@ find_version_from_git_tags() { echo "${variable_name}=${!variable_name}" } +check_nightly_version_formatting() { + local variable_name=$1 + local requested_version=${!variable_name} + if [ "${requested_version}" = "none" ]; then return; fi + + local version_date=$(echo ${requested_version} | sed -e "s/^nightly-//") + + date -d ${version_date} &>/dev/null + if [ $? != 0 ]; then + echo -e "Invalid ${variable_name} value: ${requested_version}\nNightly version should be in the format nightly-YYYY-MM-DD" >&2 + exit 1 + fi + + if [ $(date -d ${version_date} +%s) -ge $(date +%s) ]; then + echo -e "Invalid ${variable_name} value: ${requested_version}\nNightly version should not exceed current date" >&2 + exit 1 + fi +} + updaterc() { if [ "${UPDATE_RC}" = "true" ]; then echo "Updating /etc/bash.bashrc and /etc/zsh/zshrc..." @@ -159,7 +178,14 @@ else apt_get_update_if_needed apt-get -y install --no-install-recommends git fi - find_version_from_git_tags RUST_VERSION "https://github.com/rust-lang/rust" "tags/" + + echo ${RUST_VERSION} | grep -q "nightly" + is_nightly=$? + if [ $is_nightly = 0 ]; then + check_nightly_version_formatting RUST_VERSION + else + find_version_from_git_tags RUST_VERSION "https://github.com/rust-lang/rust" "tags/" + fi default_toolchain_arg="--default-toolchain ${RUST_VERSION}" fi echo "Installing Rust..." diff --git a/src/sshd/install.sh b/src/sshd/install.sh index 4ee7893..4ee7893 100644..100755 --- a/src/sshd/install.sh +++ b/src/sshd/install.sh diff --git a/src/terraform/install.sh b/src/terraform/install.sh index 3368374..3368374 100644..100755 --- a/src/terraform/install.sh +++ b/src/terraform/install.sh diff --git a/test/anaconda/test.sh b/test/anaconda/test.sh index 511291a..511291a 100644..100755 --- a/test/anaconda/test.sh +++ b/test/anaconda/test.sh diff --git a/test/aws-cli/test.sh b/test/aws-cli/test.sh index d213eac..d213eac 100644..100755 --- a/test/aws-cli/test.sh +++ b/test/aws-cli/test.sh diff --git a/test/azure-cli/test.sh b/test/azure-cli/test.sh index b8ab73a..b8ab73a 100644..100755 --- a/test/azure-cli/test.sh +++ b/test/azure-cli/test.sh diff --git a/test/common/test.sh b/test/common/test.sh index 1282015..1282015 100644..100755 --- a/test/common/test.sh +++ b/test/common/test.sh diff --git a/test/desktop-lite/test.sh b/test/desktop-lite/test.sh index bd0a516..bd0a516 100644..100755 --- a/test/desktop-lite/test.sh +++ b/test/desktop-lite/test.sh diff --git a/test/docker-from-docker/test.sh b/test/docker-from-docker/test.sh index 3a802b5..3a802b5 100644..100755 --- a/test/docker-from-docker/test.sh +++ b/test/docker-from-docker/test.sh diff --git a/test/docker-in-docker/test.sh b/test/docker-in-docker/test.sh index 3a802b5..3a802b5 100644..100755 --- a/test/docker-in-docker/test.sh +++ b/test/docker-in-docker/test.sh diff --git a/test/dotnet/test.sh b/test/dotnet/test.sh index ddba7a6..ddba7a6 100644..100755 --- a/test/dotnet/test.sh +++ b/test/dotnet/test.sh diff --git a/test/git-lfs/test.sh b/test/git-lfs/test.sh index 7e6f6f2..7e6f6f2 100644..100755 --- a/test/git-lfs/test.sh +++ b/test/git-lfs/test.sh diff --git a/test/git/test.sh b/test/git/test.sh index ce1552e..ce1552e 100644..100755 --- a/test/git/test.sh +++ b/test/git/test.sh diff --git a/test/github-cli/test.sh b/test/github-cli/test.sh index a419c34..a419c34 100644..100755 --- a/test/github-cli/test.sh +++ b/test/github-cli/test.sh diff --git a/test/go/test.sh b/test/go/test.sh index 87cc950..87cc950 100644..100755 --- a/test/go/test.sh +++ b/test/go/test.sh diff --git a/test/hugo/test.sh b/test/hugo/test.sh index c915d84..c915d84 100644..100755 --- a/test/hugo/test.sh +++ b/test/hugo/test.sh diff --git a/test/java/test.sh b/test/java/test.sh index 5c6fa89..5c6fa89 100644..100755 --- a/test/java/test.sh +++ b/test/java/test.sh diff --git a/test/kubectl-helm-minikube/test.sh b/test/kubectl-helm-minikube/test.sh index 94a024a..94a024a 100644..100755 --- a/test/kubectl-helm-minikube/test.sh +++ b/test/kubectl-helm-minikube/test.sh diff --git a/test/node/test.sh b/test/node/test.sh index 3478478..3478478 100644..100755 --- a/test/node/test.sh +++ b/test/node/test.sh diff --git a/test/oryx/test.sh b/test/oryx/test.sh index fd3a955..fd3a955 100644..100755 --- a/test/oryx/test.sh +++ b/test/oryx/test.sh diff --git a/test/php/test.sh b/test/php/test.sh index 3e4e722..3e4e722 100644..100755 --- a/test/php/test.sh +++ b/test/php/test.sh diff --git a/test/powershell/test.sh b/test/powershell/test.sh index 51fd0f0..51fd0f0 100644..100755 --- a/test/powershell/test.sh +++ b/test/powershell/test.sh diff --git a/test/python/test.sh b/test/python/test.sh index 7bd2281..7bd2281 100644..100755 --- a/test/python/test.sh +++ b/test/python/test.sh diff --git a/test/ruby/test.sh b/test/ruby/test.sh index 4c1cc36..4c1cc36 100644..100755 --- a/test/ruby/test.sh +++ b/test/ruby/test.sh diff --git a/test/rust/test.sh b/test/rust/test.sh index 3108d5e..3108d5e 100644..100755 --- a/test/rust/test.sh +++ b/test/rust/test.sh diff --git a/test/sshd/test.sh b/test/sshd/test.sh index bd0a516..bd0a516 100644..100755 --- a/test/sshd/test.sh +++ b/test/sshd/test.sh diff --git a/test/terraform/test.sh b/test/terraform/test.sh index bd0a516..bd0a516 100644..100755 --- a/test/terraform/test.sh +++ b/test/terraform/test.sh |