Should fix eureka sample
This commit is contained in:
2
pom.xml
2
pom.xml
@@ -29,7 +29,7 @@
|
||||
<bintray.package>cli</bintray.package>
|
||||
<docs.main>spring-cloud-cli</docs.main>
|
||||
<main.basedir>${basedir}/..</main.basedir>
|
||||
<spring-boot.version>2.1.0.M4</spring-boot.version>
|
||||
<spring-boot.version>2.1.0.BUILD-SNAPSHOT</spring-boot.version>
|
||||
<spring-cloud.version>Greenwich.BUILD-SNAPSHOT</spring-cloud.version>
|
||||
</properties>
|
||||
<modules>
|
||||
|
||||
11
scripts/reset-cli.sh
Executable file
11
scripts/reset-cli.sh
Executable file
@@ -0,0 +1,11 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
desired_spring_boot_cli_version="$(cat target/boot_cli_version)"
|
||||
desired_spring_cloud_cli_version="$(cat target/cloud_cli_version)"
|
||||
|
||||
source ~/.sdkman/bin/sdkman-init.sh
|
||||
|
||||
echo "Use Boot CLI in version ${desired_spring_boot_cli_version}"
|
||||
sdk use springboot "${desired_spring_boot_cli_version}"
|
||||
echo "Use Cloud CLI in version ${desired_spring_cloud_cli_version}"
|
||||
spring install org.springframework.cloud:spring-cloud-cli:"${desired_spring_cloud_cli_version}"
|
||||
51
scripts/set-cli.sh
Executable file
51
scripts/set-cli.sh
Executable file
@@ -0,0 +1,51 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
desired_spring_boot_cli_version="${1}"
|
||||
desired_spring_cloud_cli_version="${2}"
|
||||
|
||||
spring_installed="false"
|
||||
spring --version && echo "Spring CLI installed" && spring_installed="true" || echo "No Spring Installed"
|
||||
|
||||
source ~/.sdkman/bin/sdkman-init.sh
|
||||
if [[ "${spring_installed}" == "false" ]]; then
|
||||
sdk install springboot "${desired_spring_boot_cli_version}"
|
||||
fi
|
||||
|
||||
current_spring_cli_version="$(spring --version | cut -d' ' -f3 | cut -d'v' -f 2)"
|
||||
current_spring_cloud_version="$(spring cloud --version | cut -d' ' -f4 | cut -d'v' -f 2)"
|
||||
|
||||
mkdir -p target
|
||||
echo "${current_spring_cli_version}" > target/boot_cli_version
|
||||
echo "${current_spring_cloud_version}" > target/cloud_cli_version
|
||||
|
||||
case "${desired_spring_boot_cli_version}" in
|
||||
*RELEASE*)
|
||||
LOCATION="https://repo.spring.io/release/org/springframework/boot/spring-boot-cli/${desired_spring_boot_cli_version}/spring-boot-cli-${desired_spring_boot_cli_version}-bin.zip"
|
||||
;;
|
||||
*SR*)
|
||||
LOCATION="https://repo.spring.io/release/org/springframework/boot/spring-boot-cli/${desired_spring_boot_cli_version}/spring-boot-cli-${desired_spring_boot_cli_version}-bin.zip"
|
||||
;;
|
||||
*M*)
|
||||
LOCATION="https://repo.spring.io/milestone/org/springframework/boot/spring-boot-cli/${desired_spring_boot_cli_version}/spring-boot-cli-${desired_spring_boot_cli_version}-bin.zip"
|
||||
;;
|
||||
*BUILD-SNAPSHOT*)
|
||||
LOCATION="https://repo.spring.io/snapshot/org/springframework/boot/spring-boot-cli/${desired_spring_boot_cli_version}/spring-boot-cli-${desired_spring_boot_cli_version}-bin.zip"
|
||||
;;
|
||||
*)
|
||||
LOCATION="https://repo.spring.io/release/org/springframework/boot/spring-boot-cli/${desired_spring_boot_cli_version}/spring-boot-cli-${desired_spring_boot_cli_version}-bin.zip"
|
||||
;;
|
||||
esac
|
||||
|
||||
echo "Downloading [${desired_spring_boot_cli_version}] version of Spring Boot CLI"
|
||||
wget -O target/"spring-boot-cli-${desired_spring_boot_cli_version}-bin.zip" "${LOCATION}"
|
||||
pushd target
|
||||
unzip "spring-boot-cli-${desired_spring_boot_cli_version}-bin.zip"
|
||||
popd
|
||||
echo "Removing current Spring Boot CLI sc-cli-dev installation"
|
||||
rm -rf ~/.sdkman/candidates/springboot/sc-cli-dev
|
||||
echo "Installing [${desired_spring_boot_cli_version}] version of Spring Boot CLI"
|
||||
yes | sdk install springboot sc-cli-dev "target/spring-${desired_spring_boot_cli_version}/"
|
||||
echo "Use Boot CLI in version ${desired_spring_boot_cli_version}"
|
||||
yes | sdk use springboot sc-cli-dev
|
||||
echo "Use Cloud CLI in version ${desired_spring_cloud_cli_version}"
|
||||
spring install org.springframework.cloud:spring-cloud-cli:"${desired_spring_cloud_cli_version}"
|
||||
@@ -1,6 +1,7 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
<project xmlns="http://maven.apache.org/POM/4.0.0"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
||||
<artifactId>spring-cloud-cli-integration-tests</artifactId>
|
||||
@@ -44,10 +45,32 @@
|
||||
<properties>
|
||||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||
<java.version>1.8</java.version>
|
||||
<maven-antrun-plugin.version>1.8</maven-antrun-plugin.version>
|
||||
</properties>
|
||||
|
||||
<build>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>org.codehaus.mojo</groupId>
|
||||
<artifactId>exec-maven-plugin</artifactId>
|
||||
<version>1.6.0</version>
|
||||
<executions>
|
||||
<execution>
|
||||
<id>install-cli</id>
|
||||
<phase>generate-test-sources</phase>
|
||||
<configuration>
|
||||
<executable>spring</executable>
|
||||
<arguments>
|
||||
<argument>install</argument>
|
||||
<argument>org.springframework.cloud:spring-cloud-cli:${project.version}</argument>
|
||||
</arguments>
|
||||
</configuration>
|
||||
<goals>
|
||||
<goal>exec</goal>
|
||||
</goals>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<artifactId>maven-deploy-plugin</artifactId>
|
||||
<configuration>
|
||||
|
||||
Reference in New Issue
Block a user