Skip to content

Commit

Permalink
FUSETOOLS2-2163 - upgrade default runtime to Camel K 2.0.0
Browse files Browse the repository at this point in the history
Signed-off-by: Aurélien Pupier <apupier@redhat.com>
  • Loading branch information
apupier committed Nov 2, 2023
1 parent 84b15db commit 392fa10
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 8 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/insider.yml
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ jobs:
- name: Configure Kamel (ubuntu)
if: matrix.os == 'ubuntu-latest'
run: |
curl -Lo kamel.tar.gz https://github.com/apache/camel-k/releases/download/v1.12.1/camel-k-client-1.12.1-linux-64bit.tar.gz
curl -Lo kamel.tar.gz https://github.com/apache/camel-k/releases/download/v2.0.0/camel-k-client-2.0.0-linux-64bit.tar.gz
tar -zxvf kamel.tar.gz
chmod +x kamel
sudo mv kamel /usr/local/bin/
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ jobs:
- name: Configure Kamel (ubuntu)
if: matrix.os == 'ubuntu-latest'
run: |
curl -Lo kamel.tar.gz https://github.com/apache/camel-k/releases/download/v1.12.1/camel-k-client-1.12.1-linux-64bit.tar.gz
curl -Lo kamel.tar.gz https://github.com/apache/camel-k/releases/download/v2.0.0/camel-k-client-2.0.0-linux-64bit.tar.gz
tar -zxvf kamel.tar.gz
chmod +x kamel
sudo mv kamel /usr/local/bin/
Expand Down
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ All notable changes to the "vscode-camelk" extension will be documented in this

- Requires jbang for java standalone completion. It allows also to get rid of internal dependency to `kamel local` which is removed from kamel 2.x.
- Fix Java standalone support on Windows
- Update default runtime version to v2.0.0

## 0.0.35

Expand Down
12 changes: 8 additions & 4 deletions src/test/suite/versionUtils.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -94,12 +94,16 @@ suite("VersionUtils check", () => {
await validateVersion('1.12.1', Platform.LINUX, 'https://github.com/apache/camel-k/releases/download/v1.12.1/camel-k-client-1.12.1-linux-64bit.tar.gz');
});

test("validate url for existing 1.12.1 windows version", async () => {
await validateVersion('1.12.1', Platform.WINDOWS, 'https://github.com/apache/camel-k/releases/download/v1.12.1/camel-k-client-1.12.1-windows-64bit.tar.gz');
test("validate url for existing 2.0.0 version", async () => {
await validateVersion('2.0.0', Platform.LINUX, 'https://github.com/apache/camel-k/releases/download/v2.0.0/camel-k-client-2.0.0-linux-64bit.tar.gz');
});

test("validate url for existing 1.12.1 MacOS version", async () => {
await validateVersion('1.12.1', Platform.MACOS, 'https://github.com/apache/camel-k/releases/download/v1.12.1/camel-k-client-1.12.1-mac-64bit.tar.gz');
test("validate url for existing 2.0.0 windows version", async () => {
await validateVersion('2.0.0', Platform.WINDOWS, 'https://github.com/apache/camel-k/releases/download/v2.0.0/camel-k-client-2.0.0-windows-64bit.tar.gz');
});

test("validate url for existing 2.0.0 MacOS version", async () => {
await validateVersion('2.0.0', Platform.MACOS, 'https://github.com/apache/camel-k/releases/download/v2.0.0/camel-k-client-2.0.0-mac-64bit.tar.gz');
});

test("validate invalid url for xyz1 version", async () => {
Expand Down
4 changes: 2 additions & 2 deletions src/versionUtils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,13 +25,13 @@ import { platform } from './installer';
import fetch from 'cross-fetch';
import { Platform } from './shell';

export const version = '1.12.1'; //need to retrieve this if possible, but have a default
export const version = '2.0.0'; //need to retrieve this if possible, but have a default

/*
* Can be retrieved using `curl -i https://api.github.com/repos/apache/camel-k/releases/latest | grep last-modified`
* To be updated when updating the default "version" attribute
*/
const LAST_MODIFIED_DATE_OF_DEFAULT_VERSION = 'Mon, 12 Jun 2023 08:34:33 GMT';
const LAST_MODIFIED_DATE_OF_DEFAULT_VERSION = 'Mon, 24 Jul 2023 07:56:50 GMT';
let latestVersionFromOnline: string;

export async function testVersionAvailable(versionToUse: string): Promise<boolean> {
Expand Down

0 comments on commit 392fa10

Please sign in to comment.