diff --git a/.drone.yml b/.drone.yml index 0caa186..53a1b7d 100644 --- a/.drone.yml +++ b/.drone.yml @@ -1,6 +1,32 @@ kind: pipeline type: docker -name: release +name: release-amd64 + +platform: + os: linux + arch: amd64 + +trigger: + ref: + - refs/heads/trunk + - refs/heads/stable + - refs/tags/** + +steps: + - name: build + image: 324181518966.dkr.ecr.us-west-2.amazonaws.com/debian-builder:86 + + commands: + - make upload-release + +--- +kind: pipeline +type: docker +name: release-arm64 + +platform: + os: linux + arch: arm64 trigger: ref: @@ -10,7 +36,7 @@ trigger: steps: - name: build - image: 324181518966.dkr.ecr.us-west-2.amazonaws.com/debian-builder:49 + image: 324181518966.dkr.ecr.us-west-2.amazonaws.com/debian-builder:86 commands: - make upload-release @@ -28,7 +54,7 @@ trigger: steps: - name: build - image: 324181518966.dkr.ecr.us-west-2.amazonaws.com/debian-builder:49 + image: 324181518966.dkr.ecr.us-west-2.amazonaws.com/debian-builder:86 commands: - make upload-trunk diff --git a/Makefile b/Makefile index 945b726..2598989 100644 --- a/Makefile +++ b/Makefile @@ -1,14 +1,24 @@ -UNISON_NEXT_RELEASE=0.5.28 -UNISON_CURRENT_RELEASE=0.5.27 -UNISON_TRUNK=https://github.com/unisonweb/unison/releases/download/trunk-build/ucm-linux-x64.tar.gz -UNISON_RELEASE:=https://github.com/unisonweb/unison/releases/download/release%2F$(UNISON_CURRENT_RELEASE)/ucm-linux.tar.gz +UNISON_NEXT_RELEASE=1.3.1 +UNISON_CURRENT_RELEASE=1.3.0 +ARCH := $(shell dpkg --print-architecture) + +ifeq "$(ARCH)" "arm64" + UNISON_TRUNK=https://github.com/unisonweb/unison/releases/download/trunk-build/ucm-linux-arm64.tar.gz + UNISON_RELEASE:=https://github.com/unisonweb/unison/releases/download/release%2F$(UNISON_CURRENT_RELEASE)/ucm-linux-arm64.tar.gz +else + UNISON_TRUNK=https://github.com/unisonweb/unison/releases/download/trunk-build/ucm-linux-x64.tar.gz + UNISON_RELEASE:=https://github.com/unisonweb/unison/releases/download/release%2F$(UNISON_CURRENT_RELEASE)/ucm-linux-x64.tar.gz +endif + TRUNK_VERSION := $(UNISON_NEXT_RELEASE)~trunk+$(shell date '+%Y%m%d') +TRUNK_VERSION_URL := $(UNISON_NEXT_RELEASE)~trunk%2B$(shell date '+%Y%m%d') APTLY_URI := $(shell dig +short -t SRV aptly.service.us-west-2.consul.unison-lang.org | awk '{print "http://" $$4 ":" $$3}') SPACKAGE := $(shell dpkg-parsechangelog -S source) DIST := bookworm -ARCH := $(shell dpkg --print-architecture) + + TRUNK_DEB := ../$(SPACKAGE)_$(TRUNK_VERSION)_$(ARCH).deb RELEASE_DEB := ../$(SPACKAGE)_$(UNISON_CURRENT_RELEASE)_$(ARCH).deb @@ -33,15 +43,13 @@ $(RELEASE_DEB): dpkg-buildpackage -rfakeroot -uc -us upload-trunk: $(TRUNK_DEB) - curl -X POST -F file=@$(TRUNK_DEB) $(APTLY_URI)/api/files/$(SPACKAGE) - curl -X POST $(APTLY_URI)/api/repos/nightly/file/$(SPACKAGE) - curl -X DELETE $(APTLY_URI)/api/publish//bookworm - curl -X POST -H 'Content-Type: application/json' -d '{"SourceKind":"local", "Sources":[{"Name": "nightly"}, {"Name": "release"}], "Origin":"Unison Computing"}' $(APTLY_URI)/api/publish + curl -v -X POST -F "file=@$(TRUNK_DEB)" $(APTLY_URI)/api/files/$(SPACKAGE) + curl -X POST $(APTLY_URI)/api/repos/trixie-nightly/file/$(SPACKAGE)/$(SPACKAGE)_$(TRUNK_VERSION_URL)_$(ARCH).deb + curl -X PUT -H 'Content-Type: application/json' -d '{"ForceOverwrite": true}' $(APTLY_URI)/api/publish//trixie upload-release: $(RELEASE_DEB) curl -X POST -F file=@$(RELEASE_DEB) $(APTLY_URI)/api/files/$(SPACKAGE) - curl -X POST $(APTLY_URI)/api/repos/release/file/$(SPACKAGE) - curl -X DELETE $(APTLY_URI)/api/publish//bookworm - curl -X POST -H 'Content-Type: application/json' -d '{"SourceKind":"local", "Sources":[{"Name": "nightly"}, {"Name": "release"}], "Origin":"Unison Computing"}' $(APTLY_URI)/api/publish + curl -X POST $(APTLY_URI)/api/repos/trixie-release/file/$(SPACKAGE)/$(SPACKAGE)_$(UNISON_CURRENT_RELEASE)_$(ARCH).deb + curl -X PUT -H 'Content-Type: application/json' -d '{"ForceOverwrite": true}' $(APTLY_URI)/api/publish//trixie .PHONY: build upload-trunk v diff --git a/README.md b/README.md index 28cf56a..797df3f 100644 --- a/README.md +++ b/README.md @@ -1,34 +1,6 @@ This project packages the (Unison Code Manager)[https://unison-lang.org/] for the Debian and Debian-based distributions, such as Ubuntu. -## Releaseing a new version +## When a new UCM version is released +edit Makefile and increment the version numbers at the two two lines of a file. The "UNISON_NEXT_RELEASE" variable should always just be a minor version bump from the "UNISON_CURRENT_RELEASE" variable. The "UNISON_NEXT_RELEASE" variable is used to caculate the versions of the nightly builds. If the "UNISON_NEXT_RELEASE=1.2.3" then the nightly versions will be in the form "1.2.3~20240101". In debian the "~" character is used to indicate prelrelease versions. So when we eventually release a 1.2.3 version, it will be considered newer than any version that is 1.2.3~anything. -1. Update the version in the `debian/changelog` file. The easiest way to do this is to use the `dch` command from the `devscripts` package. For example: - -``` -EMAIL=stew@unison.cloud dch -v 0.51.0-1 "New upstream release" -``` - -which will create a new entry in debian/changelog that starts with something like this: - -``` -unisonweb (0.5.20~trunk+2024041702) unstable; urgency=low -``` - -This version string previx should be the same as the unison release number. A trunk or unreleased version should use the next version as the version number and a tilde, as above to add some version information to differentiate it from other prerelease versions. - -Details about how debian sorts version numbers can be found in (The Debian Policy Manual)[https://www.debian.org/doc/debian-policy/ch-controlfields.html#s-f-version]. - -You can use dpkg to verify that two versions compare they way you expect with some command like: - -``` -dpkg --compare-versions 0.5.20~trunk+2024041702 lt 0.5.20 && echo "true" || echo "false" -``` - -or - -``` -dpkg --compare-versions 0.5.20~trunk+2024041702 '<' 0.5.20 && echo "true" || echo "false" -```` - -2. Commit the changes to either the unstable or stable branch and push to github. diff --git a/debian/changelog b/debian/changelog index 7d79b71..fc55b62 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,9 @@ +unisonweb (0.5.50~trunk+20250925) bookworm; urgency=medium + + * Nightly build + + -- Stew O'Connor Thu, 25 Sep 2025 10:34:48 -0700 + unisonweb (0.5.27) bookworm; urgency=medium * Release build diff --git a/debian/control b/debian/control index cfb25cd..0f3789a 100644 --- a/debian/control +++ b/debian/control @@ -12,5 +12,5 @@ Package: unisonweb Architecture: any Section: devel Multi-Arch: foreign -Depends: ${misc:Depends}, ${shlibs:Depends}, libncurses6, libtinfo6, less, locales, racket, racket-doc +Depends: ${misc:Depends}, ${shlibs:Depends}, libncurses6, libtinfo6, less, locales Description: A functional programming language diff --git a/debian/rules b/debian/rules index 533eb1c..dc9e269 100755 --- a/debian/rules +++ b/debian/rules @@ -15,6 +15,3 @@ override_dh_install: override_dh_strip: echo - -override_dh_shlibdeps: - dh_shlibdeps -Xunison-runtime diff --git a/debian/unisonweb.install b/debian/unisonweb.install index 30a4790..4ff4751 100644 --- a/debian/unisonweb.install +++ b/debian/unisonweb.install @@ -1,5 +1,4 @@ ucm usr/bin/ build/unison/unison usr/lib/unisonweb/ -build/racket/unison.zip usr/lib/unisonweb/racket/ build/ui usr/share/unisonweb/ -build/runtime/bin/unison-runtime usr/lib/unisonweb/ + diff --git a/debian/unisonweb.postinst b/debian/unisonweb.postinst deleted file mode 100644 index 5262da5..0000000 --- a/debian/unisonweb.postinst +++ /dev/null @@ -1,11 +0,0 @@ -#!/bin/sh - -set -eu - -if [ "$1" = 'configure' ]; then - if raco pkg show -u | grep -q unison ; then - raco pkg update --auto /usr/lib/unisonweb/racket/unison.zip - else - raco pkg install --no-docs --auto /usr/lib/unisonweb/racket/unison.zip - fi -fi diff --git a/debian/unisonweb.prerm b/debian/unisonweb.prerm deleted file mode 100644 index 6d56a18..0000000 --- a/debian/unisonweb.prerm +++ /dev/null @@ -1,6 +0,0 @@ -#!/bin/sh - -case "$1" in - remove|deconfigure) - raco pkg remove unison -esac \ No newline at end of file diff --git a/debian/unisonweb.substvars b/debian/unisonweb.substvars index 980e504..97ad94f 100644 --- a/debian/unisonweb.substvars +++ b/debian/unisonweb.substvars @@ -1,3 +1,3 @@ -shlibs:Depends=libc6 (>= 2.34), libgmp10 (>= 2:6.2.1+dfsg1), zlib1g (>= 1:1.1.4) +shlibs:Depends=libc6 (>= 2.34), libgmp10 (>= 2:6.3.0+dfsg), zlib1g (>= 1:1.1.4) misc:Depends= misc:Pre-Depends= diff --git a/ucm b/ucm index 44a29bc..c8cacd9 100755 --- a/ucm +++ b/ucm @@ -1,3 +1,3 @@ #!/bin/sh -UCM_WEB_UI=/usr/share/unisonweb/ui /usr/lib/unisonweb/unison --runtime-path /usr/lib/unisonweb/unison-runtime "$@" \ No newline at end of file +UCM_WEB_UI=/usr/share/unisonweb/ui /usr/lib/unisonweb/unison "$@"