Installable package

Source file package

This is the sequence of step used to produce an installable package:

  1. Generate the packaged version (will produce dist/mayan-edms-x.y.z.tar.gz):

    $ make sdist
    
  2. Do a test install:

    $ cd /tmp
    $ virtualenv venv
    $ source venv/bin/activate
    $ pip install <path of the Git repository>/dist/mayan-edms-x.y.z.tar.gz
    $ mayan-edms.py common_initial_setup
    $ mayan-edms.py runserver
    

Wheel package

  1. Install the development requirements:

    $ pip install -r requirements/development.txt
    
  2. Create wheel package using the makefile:

    $ make wheel
    
  3. Do a test install:

    $ cd /tmp
    $ virtualenv venv
    $ source venv/bin/activate
    $ pip install <path of the Git repository>/dist/mayan_edms-x.y.z-py2-none-any.whl
    $ mayan-edms.py common_initial_setup
    $ mayan-edms.py runserver
    

Version numbering

Mayan EDMS uses the Semantic Versioning (http://semver.org/) method to choose version numbers along with Python’s PEP-0440 (https://www.python.org/dev/peps/pep-0440/) to format them.

X.YaN # Alpha release X.YbN # Beta release X.YrcN # Release Candidate X.Y # Final release

Release checklist

  1. Check for missing __init__.py modules:

    make check-missing-inits
    
  2. Update the config.env file values DJANGO_SERIES, DOCKER_IMAGE_MAYAN_TAG.

  3. Copy the config.env values:

    make copy-config-env
    
  4. Update and commit the Docker Compose file:

    make docker-docker-compose-update
    
  5. Run the system checks:

    ./manage.py check
    
  6. Update and commit the distribution .gitlab-ci.yml file:

    make gitlab-ci-update
    
  7. Scan the code with flake8 for simple style warnings:

    flake8
    
  8. Run all tests:

    make test-all
    
  9. Check for missing migrations:

    make check-missing-migrations
    
  10. Update changelog.

  11. Write release notes.

  12. Check README.rst format with:

    python setup.py check -r -s
    

    or with:

    make check-readme
    
  13. Synchronize translations:

    make translations-all
    
  14. Bump version in mayan/__init__.py and docker/rootfs/version:

    make increase-version PART=<major, minor or micro>
    
  15. Commit as version bump.

    git commit -s -m "Bump version to ..."
    
  16. Tag version:

    git tag -a vX.Y.Z -m "Version X.Y.Z"
    
  17. Generate set setup.py again to update the build number:

    make generate-setup
    
  18. Commit the new setup.py file as “Update build number”.

  19. Release the version using one of the two following methods: GitLab CI or manual

Release using GitLab CI using the makefile

  1. Use of the GitLab makefile targets: gitlab-ci-release-all, gitlab-ci-release-all-minor, gitlab-ci-release-docker-minor, gitlab-ci-release-python-minor, gitlab-ci-release-docker, gitlab-ci-release-documentation, gitlab-ci-release-python.

Release using GitLab CI manually

  1. Push the current branch:

    git push
    
  2. Push the new tags:

    git push --tags
    
  3. Delete the corresponding releases/ branch:

    git push origin :releases/<branch>
    
  4. Push the current branch to the corresponding origin releases/ branch:

    git push origin <local branch>:releases/<branch>
    

Manual release

  1. Build and upload a test release:

    make release-test-via-docker-ubuntu
    
  2. Build and upload a final release:

    make release-via-docker-ubuntu
    

Other steps

  1. Update the contrib/scripts/install/docker.sh values

  2. Upload contrib/scripts/install/docker.sh to https://get.mayan-edms.com