Release Process - DCS-gRPC/rust-server GitHub Wiki
Introduction
Following is the process for creating a release of DCS-gRPC. I am documenting it here for my own purposes since my memory sucks but also so that others know the process so they can create their own releases. It can also serve as a guide for automating the release process.
This is still WIP
Git Repo Version Bump
First we need to update all the files in the git repo for the next release. For an example commit with all these changes see this commit
- Update the
cargo.tomlto have the next release version - Do a cargo build and make sure the
cargo.lockis also updated - Update the
CHANGELOG.mdso that the latestUnreleasedheader is has the new release number and date for all the changes. - Commit the changes
- Tag the commit
- Push to github with
push --tags - Make sure the CI process passes
Create a release zip
Create the actual zip that we will upload to the github release and which users will download.
Create the folder structure
Create the folder structure for the release that will contain all the files that get copied into the DCS Saved Games DCS folder. If you have a previous release then copying and pasting the previous release is an easy way to do this.
Docs
DCS-gRPC
Protos
Missions
Mods
tech
DCS-gRPC
Scripts
DCS-gRPC
Hooks
Tools
DCS-gRPC
Protos
Copy the tools
The easiest way to do this is to copy and paste the contents of the Tools\DCS-gRPC, aside from the Protos folder, from a previous release into this one.
Copy the code into the release folder
First the main code
- Run
cargo build --releaseto create the release version of the dcs_grpc.dll file. - Copy
dcs_grpc.dllanddcs_grpc.pdbfrom thetarget\releasefolder into the releaseMods\tech\DCS-gRPCfolder - Copy the contents of the
luafolder into the releaseScriptsfolder.
Then the repl executable
- Run
cargo build --releasein thereplfolder - Copy the
dcs-grpc-repl.exefromtarget\releaseinto the releaseTools\DCS-gRPCfolder. - Rename
dcs-grpc-repl.exetorepl.exe
Copy the Proto folders
- Delete the
Protosfolder in in the releaseDocs\DCS-gRPCandTools\DCS-gRPCfolders if it already exists. - Copy the
Protosfolder into the releaseDocs\DCS-gRPCandTools\DCS-gRPCfolders.
Copy the documentation files
- Copy the
README.md,STATUS.mdandCHANGELOG.mdfiles from the repo folder to the releaseDocs\DCS-gRPCfolder.
Create and copy the api documentation file
First make sure you have protoc and protoc-gen-doc.exe executables in your main repo folder.
Then generate the documentation markdown file using the following command. substituting FULL\PATH\TO\REPO with the full path to the location of your repository.
Following is an example invocation on windows. (I am sure there is a better, more succint way of doing this but this works). Make sure to add any new .proto files do this command
.\protoc.exe --proto_path=C:\full\path\to\repo\protos --doc_out=doc\ --doc_opt=html,api.html `
C:\full\path\to\repo\protos\dcs\dcs.proto `
C:\full\path\to\repo\protos\dcs\atmosphere\v0\atmosphere.proto `
C:\full\path\to\repo\protos\dcs\coalition\v0\coalition.proto `
C:\full\path\to\repo\protos\dcs\common\v0\common.proto `
C:\full\path\to\repo\protos\dcs\controller\v0\controller.proto `
C:\full\path\to\repo\protos\dcs\custom\v0\custom.proto `
C:\full\path\to\repo\protos\dcs\group\v0\group.proto `
C:\full\path\to\repo\protos\dcs\hook\v0\hook.proto `
C:\full\path\to\repo\protos\dcs\metadata\v0\metadata.proto `
C:\full\path\to\repo\protos\dcs\mission\v0\mission.proto `
C:\full\path\to\repo\protos\dcs\timer\v0\timer.proto `
C:\full\path\to\repo\protos\dcs\trigger\v0\trigger.proto `
C:\full\path\to\repo\protos\dcs\unit\v0\unit.proto `
C:\full\path\to\repo\protos\dcs\world\v0\world.proto `
C:\full\path\to\repo\protos\dcs\net\v0\net.proto `
C:\full\path\to\repo\protos\dcs\metadata\v0\metadata.proto
Then copy doc\api.html to the release Docs\DCS-gRPC folder
Copy the sample mission
Copy the sample mission from a previous release into the Missions folder. This almost never changes so is good enough. Committing the sample mission to the repository itself is an option but not one I favour.
Create a release announcement
Create the release on Github
- Copy the previous release announcement
- Update the title, version numbers