Upload mode
In this mode, the application updates the Rigi project with source files and downloads files with Rigi 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 CLI 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:
-urlDescription: The URL of the project to which the files will be sent.
Requirements: The URL must contain the project ID (projects/{id}).
Example:
-url https://xyz.rigi.io/projects/35.Required: Yes.
-repoDescription: The path to the repository (local working directory).
The path can be relative to the location where the tool is executed or an absolute path.
The manifest file uploaded to the Rigi workspace will contain relative paths with respect to this
-repofolder.Example 33.If the
-repoparameter isfolder1\folder2\folder3and thefilepathparameter isfolder1\folder2\folder3\folder4\folder5\myfile.json, the resulting filepath in the Rigi workspace will becomefolder4\folder5\myfile.json.Example:
-repo C:\repos\repo-project.Required: Yes.
-targetfolderDescription: The path to the target folder in which processed files will be placed. If not specified, the default is the path provided in
-repo.The path can be relative to the location where the tool is executed or an absolute path.
If the
-targetforlderis not defined, the-repofolder will be used as the target folder.
Example:
-targetfolder C:\repos\repo\targets.Required: No.
Default: The value of the
-repoparameter.
-manifestRequired: Yes.
Option 1:
-manifest <value>.Description: The path to the manifest file, which contains metadata about the files.
The path to the manifest file can be relative to the location where the tool is executed or an absolute path.
The file paths provided in the manifest file can also be relative to the location of the manifest file or an absolute path.
Example:
-manifest C:\repos\repo-project\manifest.json.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" } ]
Option 2:
files:<patterns>.Description: Use to specify source files via file patterns. All files in the
-repofolder and its subfolders that match the patterns will be uploaded.To specify more than one pattern, use the
|symbol.Example: To select all files that end with
_en.jsonand files nameden-US.resx, enter the following:files:*_en.json|en-US.resx.
-localesDescription: 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 the
xlifffolderparameter is defined, locales must also be defined. Otherwise, the XLIFF files for all target locales will be downloaded.-tokenImportant
This is the recommended authentication method.
If this parameter is present, both
-usernameand-passwordwill be ignored.Important
Access tokens for the Rigi CLI tool must have the following authorizations:
Update project settings.
Upload to workspace.
Download from workspace.
Tokenize strings.
Upload translations.
Download translations.

For more details, see the Project settings – Access tokens section.
The
-tokenparameter has two options:(Recommended) The file containing the access token for authentication (
-token-file).Example:
-token token.txt.Required: No.
The access token for authentication.
Example:
-token your-access-token.Required: No.
-usernameDescription: The username for authentication. It will be ignored if the
-tokenparameter is provided or the environment variableRIGICICD_USERNAMEis defined.Example:
-username jdoe@xyz.com.Required: No.
-passwordDescription: The password for authentication. It will be ignored if the
-tokenparameter is provided or the environment variableRIGICICD_PASSWORDis defined.Example:
-password "Mygreatsecret%%".Required: No.
-tempfolderDescription: The path to the temporary folder used during the operation. If not specified, the app will create a temporary folder, and
-tempkeepwill always befalse.The generated temporary folder will have the following name: rigi_{tenantname_rigi_io}_{projectid}.
Example:
-tempfolder C:\my_temp.Required: No.
Default: A temporary folder created by the app.
-tempkeepDescription: Indicates whether to keep a copy of the ZIP file with the workspace and the manifest file that was uploaded to the server. Can be used for debugging purposes.
Required: No.
Default: If
-tempfolderis not provided, the value isfalse.
-xlifffolderDescription: Folder in which to extract xliff files. When it is not defined, xliff files will not be downloaded.
Example:
-xlifffolder C:\repos\repo\xliffs.Required: No.
-forceDescription: Unassigns and removes files from the workspace if these files are not listed in the manifest file.
Required: No.
Default:
false.
-timeout <seconds>Description: Checks whether the server is busy before starting the upload for the specified time.
Required: No.
Default:
120seconds.
-nosyncDescription: When this parameter is specified, the tool uploads files and assigns them to the workspace without synchronizing the string list.
Required: No.
-notokensDescription: When this parameter is specified, files with Rigi tokens will not be downloaded, and the
-targetfolderoption will not be used.Required: No.
Checksum calculations parameters
Depending on the project, an upload operation can take a considerable amount of time. If nothing has changed in the manifest and source files, there is no need to trigger the upload to the server. The following actions are considered a change:
A file was added to the
manifest.json.A property of one of the files listed in the
manifest.jsonhas changed (file ID, target rule ID, or parser ID).The content of one of the files has changed.
The relative location within the workspace on the server has changed.
To avoid unnecessary uploads, the checksum calculations are applied:
Before the upload is executed, a checksum is calculated over the source files and the manifest file.
This checksum is compared against the checksum of the previous successful upload operation.
If the checksums are the same, the upload is not executed.
The checksum is stored locally.
By default, the system stores the checksum in a RigiCLI folder within the application data folder on your OS. You can override that folder using the -checksumfolder argument.
You can also enforce the upload by using the -clearchecksum argument. This setting will remove the checksum for the project before uploading.
To ignore the checksums, use the -nochecksum argument.
-checksumfolderDescription: The path to the folder used to write the checksums of previous uploads. If it is not specified, the checksum will be stored in the application data subfolder rigiCLI.
Example:
-checksumfolder C:\somefolder\rigi-workspace-example\temp.Required: No.
Default: A temporary folder created by the app.
-
-clearchecksumDescription: Clears the cached checksum information for this project. It will ensure that the source files are uploaded to the workspace.
Required: No.
Default: If
-clearchecksumis not provided, the value isfalse.
Only the checksum for this project will be removed from the cache. Checksums for other projects are not affected.
-nochecksumDescription: Use this parameter to ignore the checksum mechanism, for example, if there are any issues with storing checksums.
Required: No.
Default: If
-nochecksumis not provided, the value isfalse.
This parameter overrides the settings for
-checksumfolderand-clearchecksum.
Example Command
The Rigi CLI tool is not part of the repository. In the following example, we assume it is located in the 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
-tokenparameter is used, the-usernameand-passwordparameters will be ignored.If the
-tempfolderparameter is not specified, a default temporary folder created by the app will be used, and the-tempkeepparameter will be set tofalse.