Skip to content

Commit

Permalink
Merge pull request #31 from ejgallego/new_release
Browse files Browse the repository at this point in the history
[doc] Add notes on how to release with dune-release.
  • Loading branch information
ejgallego authored Jan 30, 2019
2 parents 1916cae + eb12df3 commit 847a4dd
Show file tree
Hide file tree
Showing 4 changed files with 44 additions and 16 deletions.
3 changes: 0 additions & 3 deletions CHANGES.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
Changelog
=========

1.6
---

Expand Down
13 changes: 1 addition & 12 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,4 @@ test:
clean:
dune clean

.PHONY: build test clean release

VERSION := $$(opam query --version)
NAME_VERSION := $$(opam query --name-version)
ARCHIVE := $$(opam query --archive)

release:
git tag -a v$(VERSION) -m "Version $(VERSION)."
git push origin v$(VERSION)
opam publish prepare $(NAME_VERSION) $(ARCHIVE)
opam publish submit $(NAME_VERSION)
rm -rf $(NAME_VERSION)
.PHONY: build test clean
43 changes: 43 additions & 0 deletions README.dev.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
Welcome to ppx_import, and thanks for willing to contribute to its
development.

## How to release a new version of ppx_import

**Quick release instructions:** Run `git tag -a` + `dune-release`.

The preferred workflow to release `ppx_import` is to use
`dune-release`.

The first (and most important) step is to tag the release and push it
to the main repository.

We recommend you do this manually. As `dune-release` uses `git
describe` to gather versioning information, your tag must be
annotated. Using `git tag -a` or `git tag -s` will do the job. Please
add the version changes to the tag annotation message.

You can also use `dune-release tag`, which will try to infer the
tag information from `CHANGES.md`, however the current heuristics
seem too fragile and the changes list may not be properly updated.

Once the tag is in place, calling `dune-release` will build, lint, run
the tests, create the opam package, upload the archives and
docs to the release page, and submit a pull request to the OPAM
repository.

Under the hood, `dune-release` executes the following 4 commands:

```
dune-release distrib # Create the distribution archive
dune-release publish # Publish it on the WWW with its documentation
dune-release opam pkg # Create an opam package
dune-release opam submit # Submit it to OCaml's opam repository
```

It is often useful to run the commands separately as to have better
control of the release process.

Note that you will need the proper permissions for the `publish` step,
including setting a Github access token, see `dune-release help
files` for more information.

1 change: 0 additions & 1 deletion ppx_import.descr

This file was deleted.

0 comments on commit 847a4dd

Please sign in to comment.