Skip to content
This repository has been archived by the owner on Nov 12, 2024. It is now read-only.

Commit

Permalink
Upgrade default Camel K to 2.2.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 Jan 9, 2024
1 parent cccf722 commit e2198e0
Show file tree
Hide file tree
Showing 5 changed files with 14 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 @@ -67,7 +67,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/v2.1.0/camel-k-client-2.1.0-linux-amd64.tar.gz
curl -Lo kamel.tar.gz https://github.com/apache/camel-k/releases/download/v2.2.0/camel-k-client-2.2.0-linux-amd64.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 @@ -69,7 +69,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/v2.1.0/camel-k-client-2.1.0-linux-amd64.tar.gz
curl -Lo kamel.tar.gz https://github.com/apache/camel-k/releases/download/v2.2.0/camel-k-client-2.2.0-linux-amd64.tar.gz
tar -zxvf kamel.tar.gz
chmod +x kamel
sudo mv kamel /usr/local/bin/
Expand Down
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ All notable changes to the "vscode-camelk" extension will be documented in this

## 0.0.38

- Update default runtime version to v2.2.0

## 0.0.37

- Fix Java standalone support on MacOS
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 @@ -102,12 +102,16 @@ suite("VersionUtils check", () => {
await validateVersion('2.1.0', Platform.LINUX, 'https://github.com/apache/camel-k/releases/download/v2.1.0/camel-k-client-2.1.0-linux-amd64.tar.gz');
});

test("validate url for existing 2.1.0 windows version", async () => {
await validateVersion('2.1.0', Platform.WINDOWS, 'https://github.com/apache/camel-k/releases/download/v2.1.0/camel-k-client-2.1.0-windows-amd64.tar.gz');
test("validate url for existing 2.2.0 version", async () => {
await validateVersion('2.2.0', Platform.LINUX, 'https://github.com/apache/camel-k/releases/download/v2.2.0/camel-k-client-2.2.0-linux-amd64.tar.gz');
});

test("validate url for existing 2.1.0 MacOS version", async () => {
await validateVersion('2.1.0', Platform.MACOS, 'https://github.com/apache/camel-k/releases/download/v2.1.0/camel-k-client-2.1.0-darwin-amd64.tar.gz');
test("validate url for existing 2.2.0 windows version", async () => {
await validateVersion('2.2.0', Platform.WINDOWS, 'https://github.com/apache/camel-k/releases/download/v2.2.0/camel-k-client-2.2.0-windows-amd64.tar.gz');
});

test("validate url for existing 2.2.0 MacOS version", async () => {
await validateVersion('2.2.0', Platform.MACOS, 'https://github.com/apache/camel-k/releases/download/v2.2.0/camel-k-client-2.2.0-darwin-amd64.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 = '2.1.0'; //need to retrieve this if possible, but have a default
export const version = '2.2.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, 23 Oct 2023 08:52:28 GMT';
const LAST_MODIFIED_DATE_OF_DEFAULT_VERSION = 'Mon, 08 Jan 2024 09:36:56 GMT';
let latestVersionFromOnline: string;

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

0 comments on commit e2198e0

Please sign in to comment.