-
Notifications
You must be signed in to change notification settings - Fork 359
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #6082 from kit-ty-kate/2.1-port-release-script
[2.1 backport] Port the release script from master
- Loading branch information
Showing
5 changed files
with
222 additions
and
98 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,29 +1,33 @@ | ||
FROM multiarch/debian-debootstrap:%TARGET_TAG% | ||
FROM multiarch/alpine:%TARGET_TAG% | ||
# May need configuration on the host: | ||
# docker run --rm --privileged multiarch/qemu-user-static:register --reset | ||
LABEL Description="opam release builds" Vendor="OCamlPro" Version="1.0" | ||
|
||
RUN apt-get update && apt-get install bzip2 g++ make patch wget libltdl-dev --yes && apt-get clean --yes | ||
RUN useradd -U --create-home opam | ||
RUN apk add gcc g++ make coreutils openssl | ||
|
||
ADD https://caml.inria.fr/pub/distrib/ocaml-4.07/ocaml-4.07.1.tar.gz /root/ | ||
RUN addgroup -S opam && adduser -S opam -G opam -s /bin/sh | ||
|
||
ADD https://github.com/ocaml/ocaml/archive/refs/tags/%OCAMLV%.tar.gz /root/ | ||
|
||
WORKDIR /root | ||
RUN tar xzf ocaml-4.07.1.tar.gz | ||
WORKDIR ocaml-4.07.1 | ||
RUN tar xzf %OCAMLV%.tar.gz | ||
WORKDIR ocaml-%OCAMLV% | ||
RUN sed -i 's/gnueabi/*eabi/' configure | ||
RUN sed -i 's/musl/musl*/' configure | ||
RUN sed -i -e 's/NGROUPS_MAX/65536/' otherlibs/unix/getgroups.c | ||
RUN ./configure %CONF% -prefix /usr/local | ||
RUN make world opt.opt | ||
RUN make install | ||
RUN rm -rf /root/ocaml-4.07.1 /root/ocaml-4.07.1.tar.gz | ||
RUN make "-j$(nproc)" && make install && rm -rf /root/ocaml-%OCAMLV% /root/ocaml-%OCAMLV%.tar.gz | ||
|
||
RUN apk add patch | ||
|
||
ENV PATH /usr/local/bin:/usr/bin:/bin | ||
USER opam | ||
VOLUME /src | ||
WORKDIR /home/opam/ | ||
CMD tar xzf /src/opam-full-${VERSION}.tar.gz && \ | ||
cd opam-full-${VERSION} && \ | ||
echo "(${LINKING})" > src/client/linking.sexp && \ | ||
CMD tar xz >&2 && \ | ||
cd opam-full-${VERSION} >&2 && \ | ||
./configure --with-mccs && \ | ||
make lib-ext opam && \ | ||
strip opam && \ | ||
cp opam /src/opam-${VERSION}-${TARGET} | ||
make lib-ext && \ | ||
echo "(${LINKING})" > src/client/linking.sexp && \ | ||
make opam >&2 && \ | ||
strip opam >&2 && \ | ||
cat opam |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,29 +1,54 @@ | ||
# Steps to follow for each release | ||
|
||
## Finalise opam code for release | ||
* update version in opam files, configure.ac | ||
* update version in all the opam files and in configure.ac | ||
* run `make configure` to regenerate `./configure` [checked by github actions] | ||
* update copyright headers | ||
* run `make tests`, `opam-rt` [checked by github actions & appveyor] | ||
* update the CHANGE file: take `master_changes.md` content to fil it | ||
* if you're releasing the first final release of a new branch (e.g. 2.2.0): make sure `root_version` in OpamFile.ml is set to the final release number (e.g. for 2.2.0, root_version should be 2.2). Make sure that opamFormatUpgrade.ml also contains an upgrade function from the previous version (that function will most likely be empty) | ||
* run `make tests`, `opam-rt` [checked by github actions] | ||
* update the CHANGE file: take `master_changes.md` content to fill it | ||
|
||
## Github release | ||
|
||
[ once bump version & changes PRs merged ] | ||
* tag the release (git tag -a 2.2.0; git push origin 2.2.0) | ||
* /!\ Once the tag pushed, it can be updated only in case of severe issue | ||
* tag the release (git tag -am 2.2.0 2.2.0; git push origin 2.2.0) | ||
* /!\ Once the tag pushed, it can be updated [different commit] only in case of severe issue | ||
* create a release (or prerelease if intermediate release) draft on github based on your tag (https://github.com/ocaml/opam/releases/new) | ||
* generate opam artifacts, using `shell/release.sh`, it requires to have Docker install with several remotes, the different arches | ||
* add releases notes (content of `master_changes.md`) in the release | ||
* upload signature of artefacts | ||
* Make sure the repository is in the correct state: `git switch --detach <tag>` | ||
* launch docker using the Docker GUI macOS app | ||
* generate opam artifacts, using `release/release.sh <tag>` from a macOS/arm64 machine, it requires to have Docker and QEMU installed (see below device requirements) | ||
* generate the signatures using `release/sign.sh <tag>` | ||
* add releases notes (content of `master_changes.md`) in the release draft | ||
* upload everything from `release/out/<tag>` | ||
* finalise the release (publish) | ||
|
||
## Publish the release | ||
|
||
* add hashes in `install.sh` (and check signatures) | ||
* publish opam packages in opam-repository | ||
* publish opam packages in opam-repository (and add `flags: avoid-version` and `available: opam-version >= "2.1.0"` to each packages if this is not a stable version) | ||
* update versions (and messages, if necessary) in https://github.com/ocaml/opam-repository/blob/master/repo | ||
|
||
## Announce! | ||
|
||
* a blog entry in opam.ocaml.org | ||
* a announcement in discuss.ocaml.org | ||
* copy the blog entry from opam.ocaml.org for https://github.com/ocaml/ocaml.org/tree/main/data/changelog/opam | ||
* announce the release on the OCaml Discord server | ||
|
||
|
||
## After release | ||
|
||
* Bump the version with a `~dev` at the end (e.g. `2.2.0~alpha~dev`) | ||
* Check if reftests needs an update | ||
* Bring the changes to the changelog (CHANGES) from the branch of the release to the `master` branch | ||
|
||
### On a release candidate | ||
* create a branch to a `x.y` for rc's and the final release | ||
|
||
--- | ||
|
||
## Device requirements | ||
* Mac M1 or above with Rosetta2 | ||
* brew dependencies: git, gpg, qemu>=8.1.0, docker>=24.0.0, md5sha1sum | ||
* opam repo with the tag fetched | ||
* Have the secret key available |
Oops, something went wrong.