Skip to content

Commit

Permalink
Merge branch 'main' into feature/devonfw#103-implement-version-securi…
Browse files Browse the repository at this point in the history
…ty-checks

# Conflicts:
#	cli/pom.xml
#	cli/src/main/java/com/devonfw/tools/ide/common/SystemPath.java
#	cli/src/main/java/com/devonfw/tools/ide/tool/ToolCommandlet.java
#	cli/src/test/java/com/devonfw/tools/ide/context/AbstractIdeContextTest.java
#	documentation/LICENSE.adoc
  • Loading branch information
jan-vcapgemini committed Mar 28, 2024
2 parents f162e09 + 4e9b19b commit 3834ce8
Show file tree
Hide file tree
Showing 227 changed files with 7,107 additions and 4,793 deletions.
7 changes: 1 addition & 6 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,5 @@ jobs:
java-version: '17'
- name: Build project with Maven
run: mvn -B -ntp -Dstyle.color=always install
- name: Deploy to OSSRH nexus
env:
SONATYPE_USERNAME: ${{ secrets.SONATYPE_USERNAME }}
SONATYPE_PASSWORD: ${{ secrets.SONATYPE_PASSWORD }}
run: mvn --settings .mvn/settings.xml -DskipTests=true -Darchetype.test.skip=true -Dmaven.install.skip=true -Dstyle.color=always -B -ntp deploy
- name: Coveralls GitHub Action
uses: coverallsapp/[email protected]
uses: coverallsapp/[email protected]
9 changes: 5 additions & 4 deletions .github/workflows/nightly-build.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
name: Nightly CI Build and Snapshot Release
on:
name: Nightly Build
on:
workflow_dispatch:
schedule:
- cron: '0 2 * * *'

Expand All @@ -13,7 +14,7 @@ jobs:
- uses: actions/checkout@v3
- id: verify_commit
name: Verify latest commit is less than 24 hours
if: ${{ github.event_name == 'schedule' }}
if: ${{ (github.event_name == 'schedule') || (github.event_name == 'workflow_dispatch') }}
run: echo '::set-output name=RUN_BUILD::'$(test -n "$(git log --format=%H --since='24 hours ago')" && echo 'true' || echo 'false')

build-natives:
Expand All @@ -32,7 +33,7 @@ jobs:

- uses: graalvm/setup-graalvm@v1
with:
java-version: '17.0.7'
java-version: '21.0.2'
distribution: 'graalvm'
github-token: ${{ secrets.GITHUB_TOKEN }}
native-image-job-reports: 'true'
Expand Down
7 changes: 4 additions & 3 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Build and deploy a release including native-images
name: Release

# Runs manually
on:
Expand All @@ -19,7 +19,7 @@ jobs:

- uses: graalvm/setup-graalvm@v1
with:
java-version: '17.0.7'
java-version: '21.0.2'
distribution: 'graalvm'
github-token: ${{ secrets.GITHUB_TOKEN }}
native-image-job-reports: 'true'
Expand Down Expand Up @@ -75,8 +75,9 @@ jobs:
git commit -m "set release version to ${next_version}"
git tag -a "release/${next_version}" -m "tagged version ${next_version}"
export GPG_TTY=$TTY
mvn --settings .mvn/settings.xml -B -ntp deploy -Pdeploy -Dgpg.pin.entry.mode=loopback -Dgpg.passphrase=${{ secrets.GPG_PASSPHRASE }}
mkdir -p ./cli/target/
mv ./natives/* ./cli/target/
mvn --settings .mvn/settings.xml -B -ntp deploy -Pdeploy -Dgpg.pin.entry.mode=loopback -Dgpg.passphrase=${{ secrets.GPG_PASSPHRASE }}
env:
SONATYPE_USERNAME: ${{ secrets.SONATYPE_USERNAME }}
SONATYPE_PASSWORD: ${{ secrets.SONATYPE_PASSWORD }}
Expand Down
2 changes: 1 addition & 1 deletion .mvn/maven.config
Original file line number Diff line number Diff line change
@@ -1 +1 @@
-Drevision=2024.02.001-alpha-SNAPSHOT
-Drevision=2024.03.001-alpha-SNAPSHOT
File renamed without changes.
50 changes: 19 additions & 31 deletions README.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -10,43 +10,34 @@ image:https://img.shields.io/github/license/devonfw/IDEasy.svg?label=License["Ap
image:https://img.shields.io/maven-central/v/com.devonfw.tools.ide/ide-cli.svg?label=Maven%20Central["Maven Central",link=https://search.maven.org/search?q=g:com.devonfw.tools.ide]
image:https://github.com/devonfw/IDEasy/actions/workflows/build.yml/badge.svg["Build Status",link="https://github.com/devonfw/IDEasy/actions/workflows/build.yml"]
image:https://github.com/devonfw/IDEasy/actions/workflows/update-urls.yml/badge.svg["Update URLS Status",link="https://github.com/devonfw/IDEasy/actions/workflows/update-urls.yml"]
image:https://github.com/devonfw/IDEasy/actions/workflows/nightly-build.yml/badge.svg["Nightly Release", link="https://github.com/devonfw/IDEasy/actions/workflows/nightly-build.yml"]
image:https://coveralls.io/repos/github/devonfw/IDEasy/badge.svg?branch=main["Coverage Status",link="https://coveralls.io/github/devonfw/IDEasy?branch=main"]

toc::[]

== Setup

=== Prerequisites
** Windows
All you need before installing IDEasy is https://git-scm.com/download/[git].

** Windows
*** On Windows you need to *download and install* https://git-scm.com/download/win[git for windows].

*** You need a tool to extract `*.tar.gz` files (`tar` and `gzip`).
+
For example https://www.7-zip.org/[7-zip] or https://www.win-rar.com/[WinRar].
** Linux
*** On Linux you need to install `curl` and `git` if you don't have them already
+
[source,terminal, .text-center]
----
sudo apt-get install git curl
or
sudo yum install git-core curl
----

*** On Linux you only need to install https://git-scm.com/download/linux[git for linux].
** MacOS
*** On MacOS you only need to download and install https://git-scm.com/download/mac[git for mac].

=== Install

** Download the latest version of `devonfw-ide` from https://github.com/devonfw/IDEasy/releases[here] and extract it to a folder of your choice.
** Download the latest version of `IDEasy` from https://github.com/devonfw/IDEasy/releases[here] and execute it.
+
(You can find all Releases in https://repo.maven.apache.org/maven2/com/devonfw/tools/IDEasy/ide-cli/[Maven Central])
** Run the `setup` in this folder (On Windows you can double click on `setup.bat`)
+
A command prompt will open and the setup will start. The setup will ask for a settings URL. In case you do not have a settings URL for your project, you can just press enter to use the default settings.
A command prompt will open and the setup will start. The setup will ask for a settings URL.
In case you do not have a settings URL for your project, you can just press enter to use the default settings.
** After the setup is finished, you can close the command prompt and open a new one.
** *You are done! You can now use the `devon` command in your terminal to use the devonfw-ide.*
** *You are done! You can now use the `ide` command in your terminal to use the `IDEasy`.*

==== Video Tutorial
ifdef::env-github[]
Expand All @@ -63,23 +54,20 @@ See also our latest video https://vimeo.com/808368450/88d4af9d18[devon ide updat

== Documentation

* link:documentation/features.asciidoc[Features]
* link:documentation/setup.asciidoc[Download & Setup]
* link:documentation/usage.asciidoc[Usage]
* link:documentation/IDEasy-contribution-getting-started.asciidoc[Contribution]
* link:documentation/configuration.asciidoc[Configuration]
* link:documentation/structure.asciidoc[Structure]
* link:documentation/cli.asciidoc[Command Line Interface]
* link:documentation/variables.asciidoc[Variables]
* link:documentation/scripts.asciidoc[Scripts]
* link:documentation/settings.asciidoc[Settings]
* link:documentation/software.asciidoc[Software Folder]
* link:documentation/integration.asciidoc[Integration]
* link:documentation/advanced-tooling.asciidoc[Advanced-tooling]
* link:documentation/features.adoc[Features]
* link:documentation/setup.adoc[Download & Setup]
* link:documentation/usage.adoc[Usage]
* link:documentation/IDEasy-contribution-getting-started.adoc[Contribution]
* link:documentation/configuration.adoc[Configuration]
* link:documentation/structure.adoc[Structure]
* link:documentation/cli.adoc[Command Line Interface]
* link:documentation/variables.adoc[Variables]
* link:documentation/settings.adoc[Settings]
* link:documentation/advanced-tooling.adoc[Advanced-tooling]
* link:documentation/[Documentation]

== Contribution Guidelines
*If you want to contribute to `devon-ide` please read our https://github.com/devonfw/ide/blob/master/documentation/devonfw-ide-contribution-getting-started.asciidoc[Contribution Guidelines].*
*If you want to contribute to `IDEasy` please read our https://github.com/devonfw/IDEasy/blob/main/documentation/IDEasy-contribution-getting-started.adoc[Contribution Guidelines].*

*We use https://github.com/devonfw/IDEasy/issues[GitHub Issues] to track bugs and submit feature requests.*

Expand Down
68 changes: 61 additions & 7 deletions cli/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
<groupId>com.devonfw.tools.IDEasy</groupId>
<artifactId>ide-cli</artifactId>
<version>${revision}</version>
<name>${project.artifactId}</name>
<properties>
<mainClass>com.devonfw.tools.ide.cli.Ideasy</mainClass>
<imageName>ideasy</imageName>
Expand Down Expand Up @@ -58,10 +59,14 @@
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
<version>2.0.12</version>
<!--optional>true</optional-->
</dependency>
<dependency>
<groupId>ch.qos.logback</groupId>
<artifactId>logback-classic</artifactId>
<version>1.5.3</version>
<!--optional>true</optional-->
</dependency>
<!-- Needed for WireMock test support -->
<dependency>
Expand Down Expand Up @@ -103,6 +108,29 @@
</archive>
</configuration>
</plugin>
<!-- Copy Resources -->
<plugin>
<artifactId>maven-resources-plugin</artifactId>
<version>3.3.1</version>
<executions>
<execution>
<id>copy-resources</id>
<phase>validate</phase>
<goals>
<goal>copy-resources</goal>
</goals>
<configuration>
<outputDirectory>${project.build.directory}/package</outputDirectory>
<resources>
<resource>
<directory>src/main/package</directory>
<filtering>true</filtering>
</resource>
</resources>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>

Expand All @@ -125,17 +153,17 @@
<configuration>
<artifacts>
<artifact>
<file>target/${project.artifactId}-linux-x64.tar.gz</file>
<file>${project.build.directory}/${project.artifactId}-linux-x64.tar.gz</file>
<type>tar.gz</type>
<classifier>linux</classifier>
</artifact>
<artifact>
<file>target/${project.artifactId}-windows-x64.tar.gz</file>
<file>${project.build.directory}/${project.artifactId}-windows-x64.tar.gz</file>
<type>tar.gz</type>
<classifier>windows</classifier>
</artifact>
<artifact>
<file>target/${project.artifactId}-mac-x64.tar.gz</file>
<file>${project.build.directory}/${project.artifactId}-mac-x64.tar.gz</file>
<type>tar.gz</type>
<classifier>mac</classifier>
</artifact>
Expand Down Expand Up @@ -179,16 +207,42 @@
<agent>
<enabled>true</enabled>
</agent>
<imageName>
${imageName}
</imageName>
<imageName>${imageName}</imageName>
<buildArgs>
<arg>--enable-url-protocols=https</arg>
<arg>-H:IncludeResources="nls/.*"</arg>
<arg>--initialize-at-build-time=org.apache.commons.compress</arg>
</buildArgs>
</configuration>
</plugin>
<plugin>
<!-- Include documentation into release -->
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-dependency-plugin</artifactId>
<executions>
<execution>
<id>copy-documentation</id>
<phase>prepare-package</phase>
<goals>
<goal>copy</goal>
</goals>
</execution>
</executions>
<configuration>
<artifactItems>
<artifactItem>
<groupId>${project.groupId}</groupId>
<artifactId>ide-doc</artifactId>
<version>${project.version}</version>
<type>pdf</type>
<destFileName>IDEasy-documentation.pdf</destFileName>
</artifactItem>
</artifactItems>
<outputDirectory>${project.build.directory}/package</outputDirectory>
<overWriteReleases>false</overWriteReleases>
<overWriteSnapshots>true</overWriteSnapshots>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-assembly-plugin</artifactId>
Expand All @@ -203,7 +257,7 @@
<finalName>${releaseName}</finalName>
<appendAssemblyId>false</appendAssemblyId>
<descriptors>
<descriptor>/src/main/assembly/exec.xml</descriptor>
<descriptor>/src/main/assembly/release.xml</descriptor>
</descriptors>
</configuration>
</execution>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,21 +7,17 @@
</formats>
<includeBaseDirectory>false</includeBaseDirectory>
<fileSets>
<fileSet>
<directory>${project.build.directory}</directory>
<outputDirectory>./</outputDirectory>
<excludes>
<exclude>*</exclude>
<exclude>*/**</exclude>
</excludes>
</fileSet>
<fileSet>
<fileSet>
<directory>${project.build.directory}</directory>
<outputDirectory>./bin</outputDirectory>
<includes>
<include>${imageName}.exe</include>
<include>${imageName}</include>
</includes>
</fileSet>
<fileSet>
<directory>${project.build.directory}/package</directory>
<outputDirectory>.</outputDirectory>
</fileSet>
</fileSets>
</assembly>
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
import com.devonfw.tools.ide.tool.aws.Aws;
import com.devonfw.tools.ide.tool.az.Azure;
import com.devonfw.tools.ide.tool.cobigen.Cobigen;
import com.devonfw.tools.ide.tool.docker.Docker;
import com.devonfw.tools.ide.tool.eclipse.Eclipse;
import com.devonfw.tools.ide.tool.gcviewer.GcViewer;
import com.devonfw.tools.ide.tool.gh.Gh;
Expand All @@ -23,10 +24,13 @@
import com.devonfw.tools.ide.tool.kotlinc.KotlincNative;
import com.devonfw.tools.ide.tool.mvn.Mvn;
import com.devonfw.tools.ide.tool.node.Node;
import com.devonfw.tools.ide.tool.npm.Npm;
import com.devonfw.tools.ide.tool.oc.Oc;
import com.devonfw.tools.ide.tool.quarkus.Quarkus;
import com.devonfw.tools.ide.tool.sonar.Sonar;
import com.devonfw.tools.ide.tool.terraform.Terraform;
import com.devonfw.tools.ide.tool.vscode.Vscode;
import com.devonfw.tools.ide.tool.jasypt.Jasypt;

/**
* Implementation of {@link CommandletManager}.
Expand Down Expand Up @@ -65,10 +69,12 @@ public CommandletManagerImpl(IdeContext context) {
add(new EditionSetCommandlet(context));
add(new EditionListCommandlet(context));
add(new VersionCommandlet(context));
add(new RepositoryCommandlet(context));
add(new Gh(context));
add(new Helm(context));
add(new Java(context));
add(new Node(context));
add(new Npm(context));
add(new Mvn(context));
add(new GcViewer(context));
add(new Gradle(context));
Expand All @@ -83,6 +89,9 @@ public CommandletManagerImpl(IdeContext context) {
add(new Aws(context));
add(new Cobigen(context));
add(new Jmc(context));
add(new Jasypt(context));
add(new Docker(context));
add(new Sonar(context));
}

private void add(Commandlet commandlet) {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
package com.devonfw.tools.ide.commandlet;

import java.util.Collection;

import com.devonfw.tools.ide.common.SystemPath;
import com.devonfw.tools.ide.context.IdeContext;
import com.devonfw.tools.ide.environment.VariableLine;
import com.devonfw.tools.ide.os.WindowsPathSyntax;
import com.devonfw.tools.ide.property.FlagProperty;
import com.devonfw.tools.ide.variable.IdeVariables;

import java.util.Collection;

/**
* {@link Commandlet} to print the environment variables.
Expand Down Expand Up @@ -37,7 +37,7 @@ public String getName() {
@Override
public boolean isIdeHomeRequired() {

return false;
return true;
}

@Override
Expand All @@ -48,10 +48,14 @@ public void run() {
if (this.context.getSystemInfo().isWindows()) {
line = normalizeWindowsValue(line);
}
String lineValue = line.getValue();
if (IdeVariables.PATH.getName().equals(line.getName())) {
lineValue = this.context.getPath().toString(this.bash.isTrue());
}
lineValue = "\"" + lineValue + "\"";
line = line.withValue(lineValue);
this.context.info(line.toString());
}
SystemPath path = this.context.getPath();
this.context.info("export PATH={}", path.toString(this.bash.isTrue()));
}

VariableLine normalizeWindowsValue(VariableLine line) {
Expand Down
Loading

0 comments on commit 3834ce8

Please sign in to comment.