# Updating COPT.jl to a new COPT version

## Updating to a new technical version

When only the technical version number changes (e.g. from 6.0.2 to 6.0.3), then
only the low-level wrapper needs to be generated for the new version. Use:

```julia
julia> include("scripts/generator.jl")
julia> Generator.generate_wrapper(VersionNumber(6,0,3))
```

This will create a directory src/gen6.0.3.

Note: When the newly generated src/genX.Y.Z/libcopt.jl is identical to the
previous one except for the line "const COPT_VERSION_TECHNICAL = Z", then you
can delete the newly generated directory. When loading the COPT library, COPT.jl
automatically falls back to the low-level wrapper of a previous technical
version if the latest one does not exist.

## Updating to a new major or minor version

When the major or minor version number changes, then in addition to generating
the low-level wrapper, you also need to adjust the installer. In deps/build.jl
search for the old version number (e.g. "40" and "4.0") and add the new one.
Also adjust the "coptdir" variable at the top of src/COPT.jl, e.g. from copt40
to copt50.

## Updating the automatic installation

In order to change the COPT version that is downloaded by the automatic
installer, Artifacts.toml needs to be updated. Use:

```julia
julia> include("scripts/generator.jl")
julia> Generator.generate_artifacts_toml(VersionNumber(6,0,3))
```
