Skip to content

Commit

Permalink
SAMM CLI: Make native binaries easier to download via documentation
Browse files Browse the repository at this point in the history
Changes:
- Update documentatioт and refactoring;
- Revert samm-cli pom.xml.

Fixes: #494
  • Loading branch information
Yauhenikapl committed Jan 15, 2024
1 parent 707a60e commit 61d0558
Show file tree
Hide file tree
Showing 3 changed files with 30 additions and 24 deletions.
21 changes: 14 additions & 7 deletions .github/workflows/release-workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -133,8 +133,12 @@ jobs:
name: linux-artifacts
path: |
nexus-staging/
samm-cli-${{ github.event.inputs.release_version }}-linux-x86_64.tar.gz
samm-cli-*.jar
samm-cli-${{ env.release_version }}-linux-x86_64.tar.gz
samm-cli-${{ env.release_version }}-javadoc.jar
samm-cli-${{ env.release_version }}-sources.jar
samm-cli-${{ env.release_version }}-tests.jar
env:
release_version: ${{ github.event.inputs.release_version }}

# The Windows build will build the Windows-specific samm-cli
# and upload the binary to the build artifacts
Expand Down Expand Up @@ -243,8 +247,9 @@ jobs:

- name: Prepare release
run: |
release_version=${{ github.event.inputs.release_version }}
# Create Windows CLI zip
zip -9 -r samm-cli-${{ github.event.inputs.release_version }}-windows-x86_64.zip samm.exe *.dll
zip -9 -r samm-cli-$release_version-windows-x86_64.zip samm.exe *.dll
# Full release: Maven Central
# The (apparently) only way to retrieve the staging profile id
Expand Down Expand Up @@ -304,11 +309,12 @@ jobs:
draft: false
prerelease: false
files: |
samm-cli-${{ github.event.inputs.release_version }}-windows-x86_64.zip
samm-cli-${{ github.event.inputs.release_version }}-linux-x86_64.tar.gz
samm-cli-${{ env.release_version }}-windows-x86_64.zip
samm-cli-${{ env.release_version }}-linux-x86_64.tar.gz
samm-cli-*.jar
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
release_version: ${{ github.event.inputs.release_version }}

- name: "Notify issues of release their fix is contained in"
if: ${{ !contains( github.event.inputs.release_version, '-M' ) }}
Expand Down Expand Up @@ -369,8 +375,9 @@ jobs:
draft: false
prerelease: true
files: |
samm-cli-${{ github.event.inputs.release_version }}-windows-x86_64.zip
samm-cli-${{ github.event.inputs.release_version }}-linux-x86_64.tar.gz
samm-cli-${{ env.release_version }}-windows-x86_64.zip
samm-cli-${{ env.release_version }}-linux-x86_64.tar.gz
samm-cli-*.jar
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
release_version: ${{ github.event.inputs.release_version }}
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,15 @@

The SAMM CLI is a command line tool for the validation of Aspect Models and the generation of artifacts, such as documentation or code, from Aspect Models.

The SAMM CLI is available as a native executable for multiple platforms and as an an executable jar:
The SAMM CLI is available as a native executable for multiple platforms and as an executable jar:

TIP: Download executable jar (latest):: icon:download[] https://github.com/eclipse-esmf/esmf-sdk/releases/download/v{esmf-sdk-version}/samm-cli-{esmf-sdk-version}-x86_64.jar[samm-cli-{esmf-sdk-version}-x86_64.jar]

NOTE: For technical reasons, Java 17 or newer is required to successfully run the tool.

WINDOWS: Download native executable for Windows (latest): https://github.com/eclipse-esmf/esmf-sdk/releases/download/v{esmf-sdk-version}/samm-cli-{esmf-sdk-version}-windows-x86_64.zip[samm-cli-{esmf-sdk-version}-windows-x86_64.zip]

LINUX: Download native executable for Linux (latest): https://github.com/eclipse-esmf/esmf-sdk/releases/download/v{esmf-sdk-version}/samm-cli-{esmf-sdk-version}-linux-x86_64.tar.gz[samm-cli-{esmf-sdk-version}-linux-x86_64.tar.gz]
[TIP]
.Downloading samm-cli
====
* Download executable for Windows (latest): https://github.com/eclipse-esmf/esmf-sdk/releases/download/v{esmf-sdk-version}/samm-cli-{esmf-sdk-version}-windows-x86_64.zip[samm-cli-{esmf-sdk-version}-windows-x86_64.zip]
* Download exectuable for Linux (latest): https://github.com/eclipse-esmf/esmf-sdk/releases/download/v{esmf-sdk-version}/samm-cli-{esmf-sdk-version}-linux-x86_64.tar.gz[samm-cli-{esmf-sdk-version}-linux-x86_64.tar.gz]
* Download executable jar for other platforms and architectures (latest): https://github.com/eclipse-esmf/esmf-sdk/releases/download/v{esmf-sdk-version}/samm-cli-{esmf-sdk-version}-x86_64.jar[samm-cli-{esmf-sdk-version}-x86_64.jar]. Running this version requires Java 17.
====

[[samm-cli-getting-started]]
== Running the SAMM CLI
Expand All @@ -33,17 +33,17 @@ alias samm='java -jar /location/to/samm-cli-{esmf-sdk-version}.jar'
====

*For the Windows native executable:*
. *Download*: Download via above link or visit the repository of the Java SDK which contains the SAMM CLI at github https://github.com/eclipse-esmf/esmf-sdk/releases[releases page] and download executable file for Windows.
. *Download*: Download via above link or visit the repository of the Java SDK which contains the SAMM CLI at the Github https://github.com/eclipse-esmf/esmf-sdk/releases[releases page] and download executable file for Windows.
. *Extract*: extract it to a location of your choice.
. *Open Command Prompt*: Launch the Command Prompt and navigate to the directory (samm-cli-windows) containing our application.
. *Input*: Make sure to read the below documentation and provide model files in the correct models directory structure[directory structure].
. *Run*: In the command prompt, execute the command ``./samm.exe` to start the application.
. *Input*: Make sure to read the below documentation and provide model files in the correct xref:models-directory-structure[directory structure].
. *Run*: In the command prompt, execute the command `samm` to start the application. See the below table for details.

*For the Linux native executable:*
. *Download*: download above or visit our github https://github.com/eclipse-esmf/esmf-sdk/releases[releases page] and download executable file for Linux.
. *Download*: Download via above link or visit the repository of the Java SDK which contains the SAMM CLI at the Github https://github.com/eclipse-esmf/esmf-sdk/releases[releases page] and download executable file for Linux.
. *Extract*: Unpack the archive to your preferred directory.
. *Open Terminal*: Open the Terminal and navigate to the directory with the application.
. *Input*: Make sure to read the below documentation and provide model files in the correct models directory structure[directory structure].
. *Input*: Make sure to read the below documentation and provide model files in the correct xref:models-directory-structure[directory structure].
. *Execute*: Run the application using the command `./samm`.

Successful execution of a command is signaled by returning 0. In case of a logical or other internal error the error code 1 is being returned.
Expand Down
7 changes: 3 additions & 4 deletions tools/samm-cli/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,6 @@
</dependencies>

<build>
<finalName>samm-cli-${project.version}-x86_64</finalName>
<resources>
<resource>
<targetPath>${project.build.outputDirectory}</targetPath>
Expand Down Expand Up @@ -138,7 +137,7 @@
<mainClass>${main-class}</mainClass>
<buildArgs>
<buildArg>--no-fallback</buildArg>
<buildArg>-cp ${project.build.directory}/${project.artifactId}-${project.version}-x86_64.jar
<buildArg>-cp ${project.build.directory}/${project.artifactId}-${project.version}.jar
</buildArg>
<buildArg>-Djava.awt.headless=true</buildArg>
</buildArgs>
Expand All @@ -156,7 +155,7 @@
<configuration>
<systemPropertyVariables>
<packaging-type>${packaging-type}</packaging-type>
<executableJar>${project.build.directory}/${project.artifactId}-${project.version}-x86_64.jar
<executableJar>${project.build.directory}/${project.artifactId}-${project.version}.jar
</executableJar>
<binary>${project.build.directory}/${binary-name}</binary>
<graalVmConfigPath>${graalvm-config-path}</graalVmConfigPath>
Expand Down Expand Up @@ -522,7 +521,7 @@
<configuration>
<systemPropertyVariables>
<packaging-type>${packaging-type}</packaging-type>
<executableJar>${project.build.directory}/${project.artifactId}-${project.version}-x86_64.jar
<executableJar>${project.build.directory}/${project.artifactId}-${project.version}.jar
</executableJar>
<binary>${project.build.directory}/${binary-name}</binary>
<graalVmConfigPath>${graalvm-config-path}</graalVmConfigPath>
Expand Down

0 comments on commit 61d0558

Please sign in to comment.