<commit_before>---
layout: default
title: How to build and ship a release
---

# How to build and ship a release

Here are my notes from producing the v0.2.8 release.  Change the version number as appropriate.

## Step 1. Run the integration tests

* If you are at StackOverflow, this is in TC as "DNS > Integration Tests".
* Otherwise:
  * Run "go test" (documented in [Creating new DNS Resource Types](adding-new-rtypes))
  * Run the integration tests (documented in [Writing new DNS providers](writing-providers)


## Step 2. Bump the version number

Edit the "Version" variable in `main.go` and commit.

```
export PREVVERSION=2.8
export VERSION=2.9
git checkout master
vi main.go
git commit -m'Release v'"$VERSION" main.go
git tag v"$VERSION"
git push origin tag v"$VERSION"
```

## Step 3. Make the draft release.<commit_msg>Documentation: Add vendoring details. (#596)<commit_after>---
layout: default
title: How to build and ship a release
---

# How to build and ship a release

Here are my notes from producing the v0.2.8 release.  Change the version number as appropriate.

## Tip: How to keep modules updated

List out-of-date modules and update any that 

```
go get -u github.com/psampaz/go-mod-outdated
go list -u -m -json all | go-mod-outdated -update -direct 
```

To update a module, `get` it, then re-run the unit and integration tests.

```
go get -u
    or
go get -u module/path
```

Once the updates are complete, tidy up:

```
go mod tidy
```

When done, vendor the modules (see Step 0 below).

## Step 0. Vendor the modules

Vendor the modules. The vendored files are not used (unless you change
the builds to use `-mod=vendor`). They are maintained simply to make
sure that we have a backup in the unlikely event of a disaster.

```
go mod vendor
```

TODO(Tom): build.go should verify that this was done, similar to
how it tests that gofmt was run.

## Step 1. Run the integration tests

* If you are at StackOverflow, this is in TC as "DNS > Integration Tests".
* Otherwise:
  * Run "go test" (documented in [Creating new DNS Resource Types](adding-new-rtypes))
  * Run the integration tests (documented in [Writing new DNS providers](writing-providers)


## Step 2. Bump the version number

Edit the "Version" variable in `main.go` and commit.

```
export PREVVERSION=2.8
export VERSION=2.9
git checkout master
vi main.go
git commit -m'Release v'"$VERSION" main.go
git tag v"$VERSION"
git push origin tag v"$VERSION"
```

## Step 3. Make the draft release.
{'fraction_non_alphanumeric': 0.09863123993558776, 'fraction_numerical': 0.010064412238325281, 'mean_word_length': 3.7788461538461537, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1433387', 'n_tokens_mistral': 795, 'n_tokens_neox': 745, 'n_words': 360}