This section describes what has to be done to create a pcb release.

## Introduction

The releases as of pcb-4.0.0 are done by branching from the "master" development trunk, fixing up the release version number in the branch and then tagging the release branch sources.
The motivation for a branch rather than a tag is to make it easier to deal with setting the release version number in the documentation, distfile, and the "About" dialog box.

Note:

We need to build where we explicitly add all the export HID's and where we explicitly build with each of the gui HID's (including batch).
This is needed to catch the case of missing src/hid/*/hid.conf files.

## How to create a pcb release

Do the following steps:

1. Make sure you have up to date sources:

         git fetch
         git rebase origin/master

2. Make sure it makes distfiles ok (have to build before doing distcheck so pcb gets built so it can create some of the images in the doc directory).
   Clean up, and build with the GTK HID (default GUI):

         make distclean
         ./autogen.sh
         ./configure --disable-update-desktop-database --disable-update-mime-database
         make
         make distcheck

3. Check the build with lesstif HID:

         make distclean
         ./autogen.sh
         ./configure --disable-update-desktop-database --disable-update-mime-database --with-gui=lesstif
         make
         make distcheck

4. Check the build with the batch HID:

         make distclean
         ./autogen.sh
         ./configure --disable-update-desktop-database --disable-update-mime-database --with-gui=batch
         make
         make distcheck

5. Commit and push any changes which were needed to fix 'distcheck' problems.
   Of course if the changes aren't related then they should be committed in multiple commits:

         git add <files>
         git commit -m <message>
         git push origin master

6. If this is a bugfix release after 4.0.0, then create a branch named "pcb-4.0.1":

         git branch pcb-4.0.1
         git checkout pcb-4.0.1

   If this is a major feature release after 4.0.0, then create a branch named "pcb-4.1.0":

         git branch pcb-4.1.0
         git checkout pcb-4.1.0

   Note: You can also create a new local branch with:

         git checkout -b pcb-4.0.1 origin/master

   You need to make sure we still get the correct branch and tag on the main server eventually.
   For this write-up we continue with a bugfix release "pcb-4.0.1".

7. Update the version numbers in configure.ac and pcb.dox, in case of a bugfix release 4.0.1 after releasing 4.0.0, or 4.1.0 in case of a major feature release and push upstream.

         vi configure.ac
         vi doc/doxygen/pcb.dox
         git add configure.ac doc/doxygen/pcb.dox
         git commit -m <message>
         git push origin pcb-4.0.1

8. Update the doc/pcb.texi file with a description of this release.

9. Update the NEWS file with some sort of release notes summary.
   If needed you can obtain the number of commits with commands like:

         awk '/^2008-11-28/ {print "Changes: " c ; exit} /^20[01][0-9]/ {c++}' ChangeLog

   or:

         git rev-list <first SHA-1 hash>..<last SHA-1 hash> --count

10. Update the ChangeLog with:

          ./utils/git2cl -O > ChangeLog

11. Update the <releases> section of the application data in: data/pcb.appdata.xml.in
    Add a section similar to the example below, in reverse order (latest on top), and edit for the correct version, date of release and description.

        ​    <release version="4.0.1" date="2017-05-07">
        ​      <description>
        ​        <p>Bug fix release</p>
        ​      </description>
        ​    </release>
        ​​

12. Commit and push data/pcb.appdata.xml.in, doc/pcb-texi, NEWS and ChangeLog:

          git add data/pcb.appdata.xml.in doc/pcb.texi NEWS ChangeLog
          git commit -m <message>
          git push origin pcb-4.0.1

    Please note that these files can be committed in seperate commits as well.

13. Create the release tarball with:

          make distclean
          ./autogen.sh
          ./configure --disable-update-desktop-database --disable-update-mime-database
          make
          make distcheck
          make distclean

14. Create checksums:

          openssl sha1 pcb-pcb-4.0.1.tar.gz > pcb-4.0.1.cksum
          openssl md5 pcb-4.0.1.tar.gz >> pcb-4.0.1.cksum
          openssl rmd160 pcb-4.0.1.tar.gz >> pcb-4.0.1.cksum
          echo "File size (bytes):" >> pcb-4.0.1.cksum
          wc -c pcb-4.0.1.tar.gz >> pcb-4.0.1.cksum

15. Create a new file release for pcb with a release name of "pcb-4.0.1" (for pcb-4.0.1) on SourceForge.

    Note: You must be logged into SourceForge with an admin account.

    1. Copy the section from NEWS which are the release notes for this release.
    2. Paste the copied text into a file called pcb-4.0.1-README.txt.
    3. Click on "Files" to enter the folder.
    4. Click on "pcb" to enter the folder.
    5. Click on "Add Folder".
    6. Use "pcb-4.0.1" as the name for the new folder.
    7. Click on the new "pcb-4.0.1" folder to enter the folder.
    8. Click on "Add File".
    9. Click "Upload File" and upload the pcb-4.0.1.tar.gz, pcb-4.0.1-README.txt and pcb-4.0.1.cksum files.
    10. Click on "Upload".
    11. Click on the information icon right of "pcb-4.0.1.tar.gz" to bring up a form to edit the file details, and check the tick boxes for all the platforms to "default download" for "pcb-4.0.1.tar.gz" and click "Save".
    12. In a similar fashion, remove these settings from the previous release tarball (if needed) by clicking "Deselect all" to un-tick all the tick boxes, and click "Save".

16. Update the web pages.
    In particular, update news.shtml and index.shtml and then rebuild the corresponding .html files.

17. Do an update on the geda-project wiki page "Download"

18. Do an update ("release now") on the status of the "milestone" for this release.

19. Do an update on the status of all bug reports of this "milestone" to "Fix Released".

20. Do an announcement on the pcb project page on LaunchPad.

21. Add a tag at the HEAD of the release branch:

          git tag -a -m <msg> <tagname> <SHA1 hash>
          git push origin --tags

22. Return to your regularly scheduled trunk development and add a tag at the branch point:

          git checkout master
          git tag -a -m <msg> <tagname> <SHA1 hash>
          git push origin --tags

23. If this is a bug fix release, then simply make desired changes to the master branch by cherry picking the commit(s) with the ChangeLog, NEWS and doc/pcb.texi additions for the release.

          git cherry-pick <SHA1 hash>
          ./autogen.sh
          ./configure --disable-update-desktop-database --disable-update-mime-database --with-gui=<GUI of choice>
          make
          make distcheck
          git commit -m <message>
          git push origin master

24. Do an announcement on the geda-user mailing list and add links for pcb users to find locations to download from or read the release notes.