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.toml to have the next release version
  • Do a cargo build and make sure the cargo.lock is also updated
  • Update the CHANGELOG.md so that the latest Unreleased header 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 --release to create the release version of the dcs_grpc.dll file.
  • Copy dcs_grpc.dll and dcs_grpc.pdb from the target\release folder into the release Mods\tech\DCS-gRPC folder
  • Copy the contents of the lua folder into the release Scripts folder.

Then the repl executable

  • Run cargo build --release in the repl folder
  • Copy the dcs-grpc-repl.exe from target\release into the release Tools\DCS-gRPC folder.
  • Rename dcs-grpc-repl.exe to repl.exe

Copy the Proto folders

  • Delete the Protos folder in in the release Docs\DCS-gRPC and Tools\DCS-gRPC folders if it already exists.
  • Copy the Protos folder into the release Docs\DCS-gRPC and Tools\DCS-gRPC folders.

Copy the documentation files

  • Copy the README.md, STATUS.md and CHANGELOG.md files from the repo folder to the release Docs\DCS-gRPC folder.

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\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\tts\v0\tts.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