5. Creating a New Release - GeorgeCiesinski/text-script GitHub Wiki

This guide is for developers who are new to git, or making releases, including myself. Some of this information is for beginners and can be ignored by more advanced developers.

When to create a New Release

A new release should be created when enough new features have been added, or a significant bug is fixed. Ideally, this program should mostly be complete after several major releases, and each major release should have also have several minor releases before a new major release is created. Significant bugs should also be addressed quickly to prevent issues on the user end.

Create a New Release in Git

This repository is following the git-flow process. When the project is ready for a new release, a release/1.0.0 (new version) branch should be created from the develop branch.

  1. Ensure you have the latest commit
git checkout develop
git fetch origin
git reset --hard origin/develop
  1. Create the release branch. Follow the standard release name convention where 1.x.x is a major release, x.1.x is a minor release, and x.x.1 is a bugfix or very minor change.

git checkout -b release/1.1.0

  1. Any tidying or last minute additions should happen here.
  • Ensure version is named correctly in text-script.py
  • Ensure CHANGELOG is up to date with the latest changes
  • Ensure README is up to date
  1. Merge new release into Master
git checkout master
git pull --rebase origin master
git merge --no-ff release/1.1.0
git tag -a 1.1.0 -m "Releasing version 1.1.0"
git push origin master --tags
  1. Merge new release into Develop
git checkout develop
git pull --rebase origin develop
git merge --no-ff release 1.1.0
git push origin develop
  1. Clean up the release branch once it has been fully merged
git branch -d release/1.1.0
git push origin :release/1.1.0

Following all of the above steps should result in a tagged release appearing in the release section of this repo. Edit the release and follow the same naming convention as the other releases.

Creating an executable

Each release should have a zipped folder containing the executable and folders/files the program requires to initially run. Eventually, once the executable is able to generate these folders and files at first run, the zipped folder should only contain the executable.

To create an executable and bundle it correctly, follow the below process:

  1. Install pyinstaller as this will be required to generate the executable.

  2. Go to the textscript directory and run pyinstaller:

pyinstaller -c -F -i ../assets/textscript.ico text-script.py

  1. Move the executable into a folder called "Text-Script", and create the folders Config, Logs, and Textblocks inside as well.

  2. Include the CHANGELOG, README, LICENSE, and CONTRIBUTING FILES.

  3. Zip the package, and upload to the release as a binary.