You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

65 lines
3.1 KiB

  1. # Release management scripts
  2. ## Overview
  3. The scripts in this folder are used for release management in CircleCI. Although the scripts are fully configurable using input parameters,
  4. the default settings were modified to accommodate CircleCI execution.
  5. # Build scripts
  6. These scripts help during the build process. They prepare the release files.
  7. ## bump-semver.py
  8. Bumps the semantic version of the input `--version`. Versions are expected in vMAJOR.MINOR.PATCH format or vMAJOR.MINOR format.
  9. In vMAJOR.MINOR format, the result will be patch version 0 of that version, for example `v1.2 -> v1.2.0`.
  10. In vMAJOR.MINOR.PATCH format, the result will be a bumped PATCH version, for example `v1.2.3 -> v1.2.4`.
  11. If the PATCH number contains letters, it is considered a development version, in which case, the result is the non-development version of that number.
  12. The patch number will not be bumped, only the "-dev" or similar additional text will be removed. For example: `v1.2.6-rc1 -> v1.2.6`.
  13. ## zip-file.py
  14. Specialized ZIP command for release management. Special features:
  15. 1. Uses Python ZIP libaries, so the `zip` command does not need to be installed.
  16. 1. Can only zip one file.
  17. 1. Optionally gets file version, Go OS and architecture.
  18. 1. By default all inputs and output is formatted exactly how CircleCI needs it.
  19. By default, the command will try to ZIP the file at `build/tendermint_${GOOS}_${GOARCH}`.
  20. This can be changed with the `--file` input parameter.
  21. By default, the command will output the ZIP file to `build/tendermint_${CIRCLE_TAG}_${GOOS}_${GOARCH}.zip`.
  22. This can be changed with the `--destination` (folder), `--version`, `--goos` and `--goarch` input parameters respectively.
  23. ## sha-files.py
  24. Specialized `shasum` command for release management. Special features:
  25. 1. Reads all ZIP files in the given folder.
  26. 1. By default all inputs and output is formatted exactly how CircleCI needs it.
  27. By default, the command will look up all ZIP files in the `build/` folder.
  28. By default, the command will output results into the `build/SHA256SUMS` file.
  29. # GitHub management
  30. Uploading build results to GitHub requires at least these steps:
  31. 1. Create a new release on GitHub with content
  32. 2. Upload all binaries to the release
  33. 3. Publish the release
  34. The below scripts help with these steps.
  35. ## github-draft.py
  36. Creates a GitHub release and fills the content with the CHANGELOG.md link. The version number can be changed by the `--version` parameter.
  37. By default, the command will use the tendermint/tendermint organization/repo, which can be changed using the `--org` and `--repo` parameters.
  38. By default, the command will get the version number from the `${CIRCLE_TAG}` variable.
  39. Returns the GitHub release ID.
  40. ## github-upload.py
  41. Upload a file to a GitHub release. The release is defined by the mandatory `--id` (release ID) input parameter.
  42. By default, the command will upload the file `/tmp/workspace/tendermint_${CIRCLE_TAG}_${GOOS}_${GOARCH}.zip`. This can be changed by the `--file` input parameter.
  43. ## github-publish.py
  44. Publish a GitHub release. The release is defined by the mandatory `--id` (release ID) input parameter.