I'm trying to publish a file to AWS CodeArtifact using curl, as described here: AWS: Publishing with curl
This works until I try to publish a SNAPSHOT version, e.g. add -SHAPSHOT to the end of the version. When I append -SNAPSHOT to the version I get
Invalid name for a Snapshot build asset: 'packageName-version-SNAPSHOT.tar.gz'
Of course, replace "packageName" and "version" with the actual package name and version strings.
The curl command looks like this:
curl --request PUT "${repositoryEndpointAttainedFromAwsCli}/${repositoryName}/${packageNamespaceWithSlashesInsteadOfDots}/${packageName}/${packageVersion}/${packageName}-${packageVersion}.tar.gz" --user "aws:${authTokenAttainedFromAwsCli}" --header 'Content-Type: application/octet-stream' --data-binary @package.tar.gz
When ${packageVersion} ends with -SNAPSHOT I get the error. When ${packageVersion} doesn't end with -SNAPSHOT the publish works.
I need to publish snapshots. So what am I'm I doing wrong with the snapshot versioning?