Skip to main content

Rigi Documentation

Upload mode

In this mode, the application sends files to the project and ensures these files are returned with corresponding project tokens.

Inhibit the upload when no changes are detected

The upload command is typically used as a Git action. It is invoked automatically on specific commits to the code repository.

Infinite loops might happen when the upload returns files with Rigi tokens, and those files are then committed again.

The Rigi SDK tool prevents infinite loops by calculating a checksum over the source files listed in the manifest file and the content of the manifest file itself. When no changes are detected, the upload does not occur.

Parameters:

  • -url

    • Description: The URL of the project to which the files will be sent.

    • Example: -url https://xyz.rigi.io/projects/35.

    • Required: Yes.

  • -repo

    • Description: The path to the repository (local working directory).

    • Example: -repo C:\repos\repo-project.

    • Required: Yes.

  • -manifest

    • Description: The path to the manifest file, which contains metadata about the files.

    • Example: -manifest C:\repos\repo-project\manifest.json.

    • Required: Yes.

    • Manifest format:

      [
          {
              "filepath":  ".\\source\\shared\\common.resx",
              "fileId":  "Common",
              "parserId":  "resx",
              "targetRule":  "TR_resx"
          },
          {
              "filepath":  ".\\source\\shared\\shared.resx",
              "fileId":  "Shared",
              "parserId":  "resx",
              "targetRule":  "TR_resx"
          },
          {
              "filepath":  ".\\source\\modules\\module1.resx",
              "fileId":  "Mod1",
              "parserId":  "resx",
              "targetRule":  "TR_resx"
          }
      ]

    File paths in the manifest could be absolute or relative to the folder in which the manifest is placed.

  • -locales

    • Description: A comma-separated list of locale values that specify the target languages or regions for which xliff files must be downloaded.

    • Example: -locales de,en,fr.

    • Required: No.

    • Default: None.

    If Xlifffolder is defined, locales must be defined too. Otherwise, none of the xliff will be downloaded.

  • -username

    • Description: The username for authentication. It will be ignored if the -token parameter is provided or the environment variable RIGICICD_USERNAME is defined.

    • Example: -username jdoe@xyz.com.

    • Required: No.

  • -password

    • Description: The password for authentication. It will be ignored if the -token parameter is provided or the environment variable RIGICICD_PASSWORD is defined.

    • Example: -password "Mygreatsecret%%".

    • Required: No.

  • -token

    • Description: The access token for authentication. If this parameter is present, both -username and -password will be ignored.

    • Example: -token your-access-token.

    • Required: No.

  • -tempfolder

    • Description: The path to the temporary folder used during the operation. If not specified, the app will create a temporary folder, and -tempkeep will always be false.

    • Example: -tempfolder C:\my_temp.

    • Required: No.

    • Default: A temporary folder created by the app.

  • -tempkeep

    • Description: Indicates whether to keep the temporary folder after the operation is complete. It is useful for debugging purposes.

    • Required: No.

    • Default: If -tempfolder is not provided, the value is false.

  • -targetfolder

    • Description: The path to the target folder in which processed files will be placed. If not specified, the default is the path provided in -repo.

    • Example: -targetfolder C:\repos\repo\targets.

    • Required: No.

    • Default: The value of the -repo parameter.

  • -xlifffolder

    • Description: Folder in which to extract xliff files. When it is not defined, xliff files will not be extracted.

    • Example: -xlifffolder C:\repos\repo\xliffs.

    • Required: No.

Example Command

The Rigi SDK tool is not part of the repository. In the following example, we assume the tool is located in folder C:\rigiSDK.

dotnet Rigi-CLI.dll upload -url https://xyz.rigi.io/projects/35 -repo ..\repos\repo-project\ -manifest ..\repos\repo-project\manifest.json -locales de -username jdoe@xyz.com -password "xxxxxxxx" -tempfolder ../Temp -tempkeep

  • If the -token parameter is used, the -username and -password parameters will be ignored.

  • If the -tempfolder parameter is not specified, a default temporary folder created by the app will be used, and the -tempkeep parameter will be set to false.