Skip to content

Commit

Permalink
Adjusted .net tools arguments to match Microsoft guidelines for comma…
Browse files Browse the repository at this point in the history
…ndline
  • Loading branch information
janstaelensskyline committed Dec 15, 2023
1 parent 47c7974 commit 583cd52
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 11 deletions.
12 changes: 6 additions & 6 deletions CICD.Tools.CatalogUpload/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -22,14 +22,14 @@ public static class Program
public static async Task<int> Main(string[] args)
{
var pathToArtifact = new Option<string>(
name: "--pathToArtifact",
name: "--path-to-artifact",
description: "Path to the application package (.dmapp) or protocol package (.dmprotocol).")
{
IsRequired = true
};

var dmCatalogToken = new Option<string>(
name: "--dmCatalogToken",
name: "--dm-catalog-token",
description: "The key to upload to the catalog as defined in admin.dataminer.services. This is optional if the key can also be provided using the 'DATAMINER_CATALOG_TOKEN' environment variable (unix/win) or using 'DATAMINER_CATALOG_TOKEN_ENCRYPTED' configured with Skyline.DataMiner.CICD.Tools.WinEncryptedKeys (windows).")
{
IsRequired = false
Expand All @@ -56,7 +56,7 @@ public static async Task<int> Main(string[] args)
};

var overrideVersion = new Option<string>(
name: "--artifactVersion",
name: "--artifact-version",
description: "Optional but recommended, include a different version than the internal package version to register your package under (this can be a pre-release version). e.g. '1.0.1', '1.0.1-prerelease1', '1.0.0.1'")
{
IsRequired = false,
Expand All @@ -70,20 +70,20 @@ public static async Task<int> Main(string[] args)
};

var committerMail = new Option<string>(
name: "--authorMail",
name: "--author-mail",
description: "Optionally include the e-mail of the uploader.")
{
IsRequired = false,
};

var releaseUri = new Option<string>(
name: "--releaseNotes",
name: "--release-notes",
description: "Optionally include a URL to the release notes. e.g. https://github.com/SkylineCommunications/MyTestRepo/releases/tag/1.0.3")
{
IsRequired = false,
};

var withRegistrationCommand = new Command("WithRegistration", "Uploads artifacts to become visible in the Skyline DataMiner catalog (https://catalog.dataminer.services")
var withRegistrationCommand = new Command("with-registration", "Uploads artifacts to become visible in the Skyline DataMiner catalog (https://catalog.dataminer.services")
{
registrationIdentifier,
overrideVersion,
Expand Down
10 changes: 5 additions & 5 deletions CICD.Tools.CatalogUpload/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,14 +39,14 @@ This allows further usage only with the returned Artifact ID. The package will n
Nothing will be registered but your cloud-connected agent will be able to get deployed with the package using the returned identifier.

```console
dataminer-catalog-upload --pathToArtifact "pathToPackage.dmapp" --dmCatalogToken "cloudConnectedToken"
dataminer-catalog-upload --path-to-artifact "pathToPackage.dmapp" --dm-catalog-token "cloudConnectedToken"
```

### Authentication and Tokens

You can choose to add the DATAMINER_CATALOG_TOKEN to an environment variable instead and skip having to pass along the secure token.
```console
dataminer-catalog-upload --pathToArtifact "pathToPackage.dmapp"
dataminer-catalog-upload --path-to-artifact "pathToPackage.dmapp"
```

There are 2 options to store the key in an environment variable:
Expand Down Expand Up @@ -76,17 +76,17 @@ If you want to make your package visible on the catalog and provide the ability
The most basic command will be default anonymous and try to use the 'main' branch and the version defined in the artifact (either protocol version or dmapp version)

```console
dataminer-catalog-upload WithRegistration --pathToArtifact "pathToPackage.dmapp" --sourcecode "https://github.com/SkylineCommunications/MyTestRepo"
dataminer-catalog-upload with-registration --path-to-artifact "pathToPackage.dmapp" --sourcecode "https://github.com/SkylineCommunications/MyTestRepo"
```

Though optional, it is however highly recommended (due to current restrictions to the internal dmapp version syntax) to provide your own version tag.

```console
dataminer-catalog-upload WithRegistration --pathToArtifact "pathToPackage.dmapp" --sourcecode "https://github.com/SkylineCommunications/MyTestRepo" --version "1.0.1-alpha1"
dataminer-catalog-upload with-registration --path-to-artifact "pathToPackage.dmapp" --sourcecode "https://github.com/SkylineCommunications/MyTestRepo" --version "1.0.1-alpha1"
```

In addition you can provide additional optional information:

```console
dataminer-catalog-upload WithRegistration --pathToArtifact "pathToPackage.dmapp" --sourcecode "https://github.com/SkylineCommunications/MyTestRepo" --version "1.0.1-alpha1" --branch "dev/MyFeature" --authorMail "thunder@skyline.be" --releaseNotes "https://github.com/SkylineCommunications/MyTestRepo/releases/tag/1.0.3"
dataminer-catalog-upload with-registration --path-to-artifact "pathToPackage.dmapp" --sourcecode "https://github.com/SkylineCommunications/MyTestRepo" --version "1.0.1-alpha1" --branch "dev/MyFeature" --author-mail "thunder@skyline.be" --release-notes "https://github.com/SkylineCommunications/MyTestRepo/releases/tag/1.0.3"
```

0 comments on commit 583cd52

Please sign in to comment.