Skip to content

Latest commit

 

History

History
379 lines (274 loc) · 13.9 KB

RELEASE_MAKING.md

File metadata and controls

379 lines (274 loc) · 13.9 KB

Release making (for CGE engine or application, like castle-model-viewer)

  • Test as described in RELEASE_MAKING_TESTS.md

  • Bump versions (commit but do not push yet):

    • For applications (like castle-model-viewer):

      • Make sure Version constant in the program's source code is incremented.

      • Make sure also CastleEngineManifest.xml is updated for a program.

    • For the engine, update version numbers in these files:

      • make sure to update to "X." for release

      • all ../castle-engine/packages/*.lpk

      • ../castle-engine/src/base/castleversion.inc

      • ../castle-engine/tools/build-tool/CastleEngineManifest.xml

        and recompile castle-engine tool:

        # cge-prepare # private Michalis script, or use below:
        
        cd $CASTLE_ENGINE_PATH/tools/build-tool
        ./castle-engine_compile.sh
        mkdir -p $CASTLE_ENGINE_PATH/bin
        mv -f castle-engine $CASTLE_ENGINE_PATH/bin
        export PATH="$CASTLE_ENGINE_PATH/bin:$PATH"
        castle-engine -v # check
        
      • ../castle-engine/doc/pasdoc/html-parts/body-end.php (and run "make clean && make" in doc/pasdoc/html-parts/ to refresh API docs extra HTML).

      • check: grep "7.0-alpha"

  • Call in cge-www scripts/generate_versions.sh script.

    • Note: This is less important in new work. The version numbers stored here matter less and less, and we plan to just remove them eventually.

    • Before, you should recompile program for the current (source) OS. That's because generate_versions.sh actually calls program with --version to determine version number.

    • You should run generate_versions script to update generated_versions.php (this makes version number on WWW page - OBSOLETE) generated_versions.sh (this makes version number for some binary archives, like on itch.io).

  • Change GitHub Actions YAML to upload to vX.Y.Z tag.

    In GitHub Actions (~/.github/workflows/*.yml) find line like this:

    env:
      # To which GitHub release tag should we upload artifacts.
      # Can be "snapshot" or "vX.Y.Z" (latter when we make stable release).
      release_tag: snapshot
    

    Change to release_tag: vX.Y.Z and commit.

  • Create and push GIT tag vX.Y.Z, pushing also all above changes.

    Notes:

    • Needs to be made by GIT, not using GitHub release "create tag on publish", because we want to push files to this tag before publishing.
    • Pushing tag to repo (see below) requires that related commit be also pushed. Our workflow can update the tag later anyway to newer commit, so don't worry, don't be afraid to push the tag :)
    git tag -a vX.Y.Z -m "Tagging the version X.Y.Z."
    git push # push all commits
    git push origin vX.Y.Z # push tag to repo
    
  • Create new draft release from existing tags on GitHub, like

    Set proper GIT tag. The release will not have files -- we will let GitHub Actions to fill it with files next.

  • Wait for GH Actions to update the release.

  • Write release notes, for GH and Wordpress:

    • Write using AsciiDoc:
      • Make a separate page on our website like release_7.0-alpha.3.adoc.
      • Link to it from castle_engine_functions.php and release.adoc.
    • Convert to Markdown:
  • Publish release on GitHub - fill with final description, press "Publish".

  • Update the webpage:

    • Update versions in .adoc:

      • for applications
        • section names like Download (version 2.1.0)
        • usage of cge::download-application
      • for engine
        • link to GitHub release, either snapshot or latest, in htdocs/doc/download.adoc
        • usage of cge::download-engine in htdocs/doc/download.adoc

      Note: If you changed something outside of ADOC, that affects HTML generation, do (on server) touch xxx.adoc to force regeneration of given page. Do not do rm -f output/download.html to force this (as this means the page gets temporarily broken).

    • Grep to make sure all things changed 7.0-alpha.snapshot 7.0-alpha-snapshot # mistake 7.0-alpha.1 7.0-alpha1 # mistake to make sure everything is updated.

  • Download and make last tests.

  • if you released new castle_game_engine version:

    • make sure new apidoc is already uploaded.

      Alt: you can upload it manually

      cd ../castle-engine/doc/pasdoc/
      make clean upload
      
    • update FPC/Lazarus requirements if needed: https://castle-engine.io/supported_compilers.php

    • update CGE version of Docker cge-stable:

      Open https://github.com/castle-engine/castle-engine-docker/ .

      Grep for 7.0-alpha, change to new version, commit and push. GHA will build new Docker image for cge-stable.

      Once done, check it:

      docker pull kambi/castle-engine-cloud-builds-tools:cge-stable
      docker run --name my-cge-container-teststable -it kambi/castle-engine-cloud-builds-tools:cge-stable bash
        castle-engine --version
        cat /usr/local/castle-engine/src/base/castleversion.inc
        cd /usr/local/castle-engine/examples/animations/play_animation/
        castle-engine compile
      docker rm my-cge-container-teststable
      
  • In case of CGE and castle-model-viewer, upload them also to http://castle-engine.itch.io/

    # This is to make sure you have itch.io butler installed and authenticated.
    # Follow https://itch.io/docs/butler/installing.html if not yet,
    # you can actually install it using itch.io GUI app: https://itch.io/app ,
    # just "chmod +x ..." the butler binary and add it to $PATH.
    butler status castle-engine/castle-game-engine
    
    • To upload CGE, run script in this repo:

      cd ..../cge-www/pack/
      ./upload_itch_io.sh
      

      Store MD5 sums on the side -- to compare with SF uploader, to validate that the downloads from GH were OK.

    • To upload castle-model-viewer, run script from castle-model-viewer repo:

      cd ..../castle-model-viewer/pack/itch_io/
      ./upload_itch_io.sh
      

    Once butler status ... is good,

  • In case of CGE and castle-model-viewer, upload them also to https://sourceforge.net/projects/castle-engine/ files:

    Make sure auth works and doesn't ask for password/2fa each time: (upload your SSH key to https://sourceforge.net/auth/shell_services)

    ssh 'kambi,castle-engine@frs.sourceforge.net'
    

    To upload, run

    cd pack/
    ./upload_sourceforge.sh
    

    Mark on SourceForge default download for Linux/Windows as latest CGE.

    Login to https://sourceforge.net/projects/castle-engine/

    Check this contains new files: https://sourceforge.net/projects/castle-engine/files/castle-model-viewer/ https://sourceforge.net/projects/castle-engine/files/castle_game_engine/

    Mark new CGE files as default for Linux/Windows. After a moment, Ctrl+R will show new version.

  • bump versions/code afterwards, to again make nice snapshots:

    • engine: version to x.<odd>.0 or alpha.snapshot

      (redo again the section above about bumping version, also recheck "bump version" commit that we touched the same files)

    • applications: version to x.<odd>.0

  • Fix snapshots:

    • change GitHub Actions YAML to upload to snapshot tag.
    • remove from snapshot release the old versions (new versions have new names).
    • make sure new snapshot done OK.

Website updating

  • Note: after large website changes it is a good idea to check linkchecker.sh validate_html.sh

  • if you change some content managed inside GIT (cge-www):

    • commit and push your changes to cge-www
    • ssh-cge-sync (to update on castle-engine.io)
  • make sure apidoc in https://castle-engine.io/apidoc/html/ looks OK. It is now automatically updated by a Jenkins job, though if you want you can upload it manually by

    cd ~/sources/castle-engine/castle-engine/doc/pasdoc make upload

    You can also update https://castle-engine.io/engine_doc.php (HTML, PDF) by

    cd ~/sources/castle-engine/cge-documentation/vrml_engine_internals make upload

    You can also update https://castle-engine.io/compositing_shaders.php (HTML, PDF) by

    cd ~/sources/castle-engine/cge-documentation/compositing_shaders_doc make upload

Announcing release