-
Notifications
You must be signed in to change notification settings - Fork 0
Release process
Release process for ceylond 1.0.0, based on ceylon.ast
(1.3.1).
Choose a timestamp: date +%s
, round it a bit, check with date -d @<rounded timestamp>
that it’s still plausible.
Start with the reproducible build script from ceylon.ast
1.3.1, and adapt it heavily (update existing variables, separate variables for language and project version, new variables for GitHub repository user and name, and more). The result can be found here.
Take the Debian-Jessie-ceylondeps-1.3.1
container from the ceylon.formatter
and ceylon.ast
release and make sure it’s up to date.
sudo machinectl read-only Debian-Jessie-ceylondeps-1.3.1 false
time sudo systemd-nspawn -M Debian-Jessie-ceylondeps-1.3.1 /bin/sh -c 'apt update && apt upgrade --yes'
sudo machinectl read-only Debian-Jessie-ceylondeps-1.3.1 true
Clone the container into a persistent container for the release.
sudo machinectl clone Debian-Jessie-{ceylondeps-1.3.1,ceylond-1.0.0}
Edit the build script to add an exit just before the “compare checksums” step, and to add a version-
qualifier to the git checkout
line, since the real tag hasn’t been created yet. (Don’t forget to push the version-
branch if you haven’t done it yet.) Run it in the container. (At this point, I noticed I didn’t have Ant build files yet, and added them.)
time sudo systemd-nspawn -M Debian-Jessie-ceylond-1.0.0 /bin/bash < build
Enter the container.
sudo systemd-nspawn -M Debian-Jessie-ceylond-1.0.0
Build the documentation. (2017-05-27 addendum: I just noticed that the docs on Herd have broken encoding, so perhaps next time set the encoding before this step, instead of only when starting with the tests.)
cd /opt/ceylond
ceylon doc de.lucaswerkmeister.ceylond.{core,recordBased,packetBased,daemonizeProgram}
Create a Herd upload. Upload everything with ceylon copy
.
ceylon copy --out https://modules.ceylon-lang.org/uploads/85617/repo/ --user lucaswerkmeister --pass 'XXX' --all de.lucaswerkmeister.ceylond.{core,recordBased,packetBased,daemonizeProgram}/1.0.0
Remove the package.json
files (but watch out for ceylon/ceylon-herd#271!).
Verify that the upload contains everything and has no warnings.
Edit the build script to change the repo URL to the upload’s public URL, and remove the exit. Run it in an ephemeral version of the container.
time sudo systemd-nspawn --ephemeral -M Debian-Jessie-ceylondeps-1.3.1 /bin/bash < build
Rejoice that it prints four pairs of two identical checksums at the end.
Enter the persistent container again.
sudo systemd-nspawn -M Debian-Jessie-ceylond-1.0.0
We want to compile the test module now. But since it uses some UTF-8 files, we’ll have to install locales first.
apt install locales
dpkg-reconfigure locales # enable en_US.UTF-8 (as of this writing: 146 on Jessie, 152 on Stretch)
export LC_ALL=en_US.UTF-8 # ignore bash’s warning
Compile the test module, using the uploaded module.
cd /opt/ceylond
rm -rf modules
ceylon compile,fat-jar --rep https://modules.ceylon-lang.org/uploads/85617/public/repo/ --rep modules/ test.de.lucaswerkmeister.ceylond
Since there’s no systemd-socket-activate
in Debian Jessie, we can’t actually run the tests in the container. Instead, I ran them on my laptop.
cd ~/git/ceylon/ceylond
rm -rf modules node_modules
ceylon compile --rep https://modules.ceylon-lang.org/uploads/85617/public/repo/ test.de.lucaswerkmeister.ceylond
ceylon fat-jar --rep https://modules.ceylon-lang.org/uploads/85617/public/repo/ --rep modules/ test.de.lucaswerkmeister.ceylond
ceylon compile-js --rep https://modules.ceylon-lang.org/uploads/85617/public/repo/ test.de.lucaswerkmeister.ceylond
ceylon copy --js --with-dependencies --include-language --out node_modules --rep https://modules.ceylon-lang.org/uploads/85617/public/repo/ --rep modules de.lucaswerkmeister.ceylond.{core,recordBased,packetBased,daemonizeProgram} test.de.lucaswerkmeister.ceylond
nobuild= ./test
ls modules # check that the only folder inside is test, i. e., the ceylon.ast modules really came from the Herd upload
Publish the upload.
Run the tests again, this time from Herd.
cd ~/git/ceylon/ceylond
rm -rf modules node_modules
ceylon compile test.de.lucaswerkmeister.ceylond
ceylon fat-jar test.de.lucaswerkmeister.ceylond
ceylon compile-js test.de.lucaswerkmeister.ceylond
ceylon copy --js --with-dependencies --include-language --out node_modules de.lucaswerkmeister.ceylond.{core,recordBased,packetBased,daemonizeProgram} test.de.lucaswerkmeister.ceylond
nobuild= ./test
ls modules # check that the only folder inside is test, i. e., the ceylon.ast modules really came from the Herd upload
Edit the build script to change the repo URL back to Herd. Run it again:
time sudo systemd-nspawn --ephemeral -M Debian-Jessie-ceylondeps-1.3.1 /bin/bash < build
Rejoice that the checksums are still identical.
Remove the version-
qualifier from the git checkout
line in the build script. Write and create the tag.
git tag -s -F CHANGES 1.0.0
We want to verify the build again on a completely fresh Debian system. For that, we first need to make sure the base image is up to date.
sudo machinectl read-only Debian-Jessie-Base false
time sudo systemd-nspawn -M Debian-Jessie-Base /bin/sh -c 'apt update && apt upgrade --yes'
sudo machinectl read-only Debian-Jessie-Base true
Verify one last time that the reproducible build works on a completely fresh Debian system. Since the tag hasn’t been pushed yet, we re-add the version- qualifier in sed.
git show --pretty=format:%m 1.0.0 | sed -n '/#!/,/exit 0/{s/^ //;s/checkout /checkout version-/;p}' | sudo systemd-nspawn --ephemeral -M Debian-Jessie-Base /bin/bash
Push the tag. Test the ultra-condensed “tweet” version of the reproducible build script:
mkdir deb
sudo debootstrap jessie deb
git show 1.0.0 | sed -n '/#!/,/exit 0/p' | sudo systemd-nspawn -D deb /bin/bash
Go to the GitHub release page and edit the tag to turn the message into proper Markdown (mostly: undo line breaking).
Download the release files from Herd:
cd /tmp
mkdir ceylond
cd ceylond
for mod in core recordBased packetBased daemonizeProgram; do wget https://modules.ceylon-lang.org/repo/1/de/lucaswerkmeister/ceylond/$mod/1.0.0/de.lucaswerkmeister.ceylond.$mod-1.0.0{.car,.js,-model.js,.src}{,.sha1}; done
Verify that you have 32 files:
find -type f | wc -l
Add them all to the GitHub release, in groups of 2 files. (If you upload too many at once, you get an error, and you’ll have to delete them all again one by one. Very annoying.)
Publish the GitHub release. Proceed with cformat release.