The repository name could now be computed from prefix, distribution and
component names. Format:
{prefix}-{distribution}-{component}
Note: if the default prefix is specified ("."), it will not be used to
compute the repository name.
So, all works is now done by itering on detected changes files. Foreach
of then:
- the changes file is parsed to detect the source package name, the
distribution and included files
- the repository name is computed (if not specified in environment)
- the current published distribution is retreived using APTLY publish
API to:
- check it was already manally published a first time
- check it used a snapshot kind of sources
- retreive other components source snapshot
- Upload the changes file and all its included files using APTLY File
Upload API in a directory named as the source package
- Include the changes file using APTLY Local Repos API
- Compute a snapshot name for the repository based on the current date
and the repository name. Format: YYYYMMDD-HHMMSS-{repository name}
- Create a snapshot of the repository using APTLY Local Repos API
- Update the published distribution with this new snapshot as source of
the specified component (default: main) and keeping other components
source snapshot.
When calling APTLY publish API, we have to pass the distribution name
and not the repository name. Distribution names are now collected from
changes files and a call to the APTLY publish API will be made for all
updated distribution.
Also add a PREFIX parameter to permit to specify the APTLY prefix (and
storage if it need to be specified).