Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions CHANGELOG.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,9 @@ Release with new features and bugfixes:
* https://github.com/devonfw/IDEasy/issues/1685[#1685]: Add Nest CLI to IDEasy commandlets
* https://github.com/devonfw/IDEasy/issues/1882[#1882]: Add AWS CDK to IDEasy commandlets
* https://github.com/devonfw/IDEasy/issues/800[#800]: Fix infinite recursion in Sonar start/stop on macOS
* https://github.com/devonfw/IDEasy/issues/1922[#1922]: Add Task CLI to IDEasy commandlets


* https://github.com/devonfw/IDEasy/issues/1884[#1884]: Fix java unzipping losing symlink information
* https://github.com/devonfw/IDEasy/issues/1716[#1716]: Add commandlet for Claude Code CLI
* https://github.com/devonfw/IDEasy/issues/1844[#1844]: Fix vscode installation hanging indefinitely in WSL Linux environments
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@
import com.devonfw.tools.ide.tool.sonar.Sonar;
import com.devonfw.tools.ide.tool.spring.Spring;
import com.devonfw.tools.ide.tool.squirrelsql.SquirrelSql;
import com.devonfw.tools.ide.tool.task.Task;
import com.devonfw.tools.ide.tool.terraform.Terraform;
import com.devonfw.tools.ide.tool.tomcat.Tomcat;
import com.devonfw.tools.ide.tool.uv.Uv;
Expand Down Expand Up @@ -133,6 +134,7 @@ public CommandletManagerImpl(IdeContext context) {
add(new KotlincNative(context));
add(new KubeCtl(context));
add(new Tomcat(context));
add(new Task(context));
add(new Vscode(context));
add(new Azure(context));
add(new Aws(context));
Expand Down
4 changes: 4 additions & 0 deletions cli/src/main/java/com/devonfw/tools/ide/common/Tag.java
Original file line number Diff line number Diff line change
Expand Up @@ -332,6 +332,10 @@ public final class Tag {
/** {@link Tag} for Nest. */
public static final Tag NEST = create("nest", FRAMEWORK, false, new String[] { "nestjs", "nestcli" }, TYPE_SCRIPT);

/** {@link Tag} for Task (Taskfile). */
public static final Tag TASK = create("task", BUILD, false, "taskfile", "gotask");


private final String id;

private final Tag parent;
Expand Down
29 changes: 29 additions & 0 deletions cli/src/main/java/com/devonfw/tools/ide/tool/task/Task.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
package com.devonfw.tools.ide.tool.task;


import java.util.Set;

import com.devonfw.tools.ide.common.Tag;
import com.devonfw.tools.ide.context.IdeContext;
import com.devonfw.tools.ide.tool.ToolCommandlet;
import com.devonfw.tools.ide.tool.npm.NpmBasedCommandlet;

/**
* {@link ToolCommandlet} for Task CLI.
*/
public class Task extends NpmBasedCommandlet {

/**
* The constructor.
*
* @param context the {@link IdeContext}.
*/
public Task(IdeContext context) {
super(context, "task", Set.of(Tag.TASK));
}

@Override
public String getPackageName() {
return "@go-task/cli";
}
}
2 changes: 2 additions & 0 deletions cli/src/main/resources/nls/Help.properties
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,8 @@ cmd.squirrel-sql=Tool commandlet for SQuirreL SQL Client.
cmd.squirrel-sql.detail=SQuirreL SQL Client is a graphical Java program that allows you to manage JDBC compliant databases. Detailed documentation can be found at https://squirrel-sql.sourceforge.io/
cmd.status=Prints the status report about your IDEasy.
cmd.status.detail=To check your IDE-status (e.g. duplicated or legacy variables) as well as potential information about updates to settings you should apply\nwith ide update, run the following command: 'ide status'.
cmd.task=Tool commandlet for Task CLI.
cmd.task.detail=The Task CLI is a task runner and build tool inspired by Make that helps you automate development workflows using simple and readable configuration. Detailed documentation can be found at https://taskfile.dev/
cmd.terraform=Tool commandlet for Terraform.
cmd.terraform.detail=Terraform is an infrastructure as code tool for managing cloud resources. Detailed documentation can be found at https://www.terraform.io/docs/index.html
cmd.tomcat=Tool commandlet for Tomcat
Expand Down
2 changes: 2 additions & 0 deletions cli/src/main/resources/nls/Help_de.properties
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,8 @@ cmd.squirrel-sql=Werkzeug Kommando für den SQuirreL SQL Client.
cmd.squirrel-sql.detail=SQuirreL SQL Client ist ein grafisches Java-Programm zur Verwaltung von JDBC-kompatiblen Datenbanken. Ausführliche Dokumentation ist zu finden unter https://squirrel-sql.sourceforge.io/
cmd.status=Gibt einen Statusbericht über IDEasy aus
cmd.status.detail=Um den Status Ihrer IDE zu überprüfen (z.B. doppelte oder veraltete Variablen) sowie potenzielle Informationen über Updates zu den Einstellungen,\ndie Sie mit dem Befehl 'ide update' anwenden sollten, führen Sie den folgenden Befehl aus: 'ide status'.
cmd.task=Werkzeugkommando für Task CLI.
cmd.task.detail=Die Task CLI ist ein Task‑Runner und Build‑Tool, inspiriert von Make, das dabei hilft, Entwicklungsabläufe mithilfe einfacher und lesbarer Konfiguration zu automatisieren. Detaillierte Dokumentation ist zu finden unter https://taskfile.dev/
cmd.terraform=Werkzeug Kommando für Terraform.
cmd.terraform.detail=Terraform ist ein Tool für Infrastructure as Code zur Verwaltung von Cloud-Ressourcen. Detaillierte Dokumentation ist zu finden unter https://www.terraform.io/docs/index.html
cmd.tomcat=Werkzeug Kommando für Tomcat
Expand Down
12 changes: 12 additions & 0 deletions cli/src/test/integration-tests/install-task.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
echo "Running install task integration test"
ide -d install task

task_location=""
if doIsWindows
then
task_location=""
else
task_location="bin/"
fi

assertThat "${IDE_ROOT}/${TEST_PROJECT_NAME}/software/node/${task_location}task" exists
63 changes: 63 additions & 0 deletions cli/src/test/java/com/devonfw/tools/ide/tool/task/TaskTest.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
package com.devonfw.tools.ide.tool.task;


import org.junit.jupiter.api.Test;

import com.devonfw.tools.ide.context.AbstractIdeContextTest;
import com.devonfw.tools.ide.context.IdeTestContext;
import com.github.tomakehurst.wiremock.junit5.WireMockRuntimeInfo;
import com.github.tomakehurst.wiremock.junit5.WireMockTest;


/**
* Test of {@link Task}.
*/
@WireMockTest
class TaskTest extends AbstractIdeContextTest {

private static final String PROJECT_TASK = "task";

@Test
void testTaskInstall(WireMockRuntimeInfo wireMockRuntimeInfo) {

IdeTestContext context = newContext(PROJECT_TASK, wireMockRuntimeInfo);
Task commandlet = new Task(context);

commandlet.install();

checkInstallation(context);
}

@Test
void testTaskUninstall(WireMockRuntimeInfo wireMockRuntimeInfo) {

IdeTestContext context = newContext(PROJECT_TASK, wireMockRuntimeInfo);
Task commandlet = new Task(context);

commandlet.install();
checkInstallation(context);

commandlet.uninstall();

assertThat(context).logAtInfo().hasMessageContaining("npm uninstall -g @go-task/cli");
assertThat(context).logAtSuccess().hasMessage("Successfully uninstalled task");
}

@Test
void testTaskRun(WireMockRuntimeInfo wireMockRuntimeInfo) {

IdeTestContext context = newContext(PROJECT_TASK, wireMockRuntimeInfo);
Task commandlet = new Task(context);
commandlet.arguments.setValue("--version");

commandlet.run();

assertThat(context).logAtInfo().hasMessageContaining("task --version");
}

private void checkInstallation(IdeTestContext context) {

assertThat(context).logAtInfo().hasMessageContaining("npm install -gf @go-task/cli@3.43.3");
assertThat(context).logAtSuccess().hasMessageContaining("Successfully installed task in version 3.43.3");
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
${testbaseurl}/download/node/node/v18.19.1/node-v18.19.1.tgz
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"[9.0, 10.0)": [
{
"tool": "node",
"versionRange": "[18.0.0,)"
}
]
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
NODE_VERSION=v18.19.1
NPM_VERSION=9.9.2
TASK_VERSION=3.43.3
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
#!/bin/bash
if [ "$1" == "--version" ]; then
echo "9.9.2"
exit
fi
echo "npm $*"
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
#!/bin/bash
echo "npx $*"
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
#!/bin/bash
echo "task $*"
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"versions": {
"3.43.3": {
"version": "3.43.3",
"dist": {
"tarball": "${testbaseurl}/@go-task/-/cli-3.43.3.tgz"
}
}
}
}

1 change: 1 addition & 0 deletions documentation/LICENSE.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,7 @@ The column `inclusion` indicates the way the component is included:
|https://squirrel-sql.sourceforge.io/[SQuirreL SQL Client]|Optional|https://github.com/squirrel-sql-client/squirrel-sql-stable-releases/blob/main/LICENSE[LGPL 2.1]
|https://docs.nestjs.com/cli/overview[NestJS CLI] |Optional|https://github.com/nestjs/nest-cli/blob/master/LICENSE[MIT License]
|https://docs.aws.amazon.com/cdk/v2/guide/home.html[AWS CDK CLI] |Optional|https://github.com/aws/aws-cdk-cli/blob/main/LICENSE[Apache 2.0]
|https://taskfile.dev/[Task CLI] |Optional|https://github.com/go-task/task/blob/main/LICENSE[MIT License]
|===

== Apache Software License - Version 2.0
Expand Down
Loading