summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--meson.build8
-rwxr-xr-xtools/doc-publish.sh44
-rwxr-xr-xtools/release-publish.sh40
3 files changed, 91 insertions, 1 deletions
diff --git a/meson.build b/meson.build
index 6c3a6bf..5b25206 100644
--- a/meson.build
+++ b/meson.build
@@ -1,7 +1,7 @@
# This file is part of cairomm.
project('cairomm', 'cpp',
- version: '1.16.0',
+ version: '1.16.1',
license: 'LGPLv2+',
default_options: [
'cpp_std=c++17',
@@ -270,12 +270,18 @@ if not meson.is_subproject()
python3.path(), dist_changelog_py,
project_source_root,
)
+ # Don't distribute these files and directories.
+ dont_distribute = [
+ 'tools',
+ ]
+
# Add build scripts to the distribution directory, and delete .gitignore
# files and an empty $MESON_DIST_ROOT/build/ directory.
meson.add_dist_script(
python3.path(), dist_build_scripts_py,
project_source_root,
'untracked' / 'build_scripts',
+ dont_distribute,
)
endif
diff --git a/tools/doc-publish.sh b/tools/doc-publish.sh
new file mode 100755
index 0000000..ec0e81a
--- /dev/null
+++ b/tools/doc-publish.sh
@@ -0,0 +1,44 @@
+#!/bin/bash
+
+# Upload cairomm documentation to cairographics.org/documentation/cairomm/reference
+
+if [ $# -ne 2 ]
+then
+ echo "Usage: $0 <version> <username>"
+ echo "Example: $0 1.14.0 foo"
+ exit 1
+fi
+
+PACKAGE=cairomm
+VERSION=$1
+USERNAME=$2
+
+RELEASE_UPLOAD_HOST=cairographics.org
+RELEASE_UPLOAD_BASE=/srv/cairo.freedesktop.org/www
+
+DOC_UNVERSIONED=$PACKAGE-doc
+DOC_VERSIONED=$PACKAGE-doc-$VERSION
+DOC_TAR_FILE_UNVERSIONED=$DOC_UNVERSIONED.tar.gz
+DOC_TAR_FILE_VERSIONED=$DOC_VERSIONED.tar.gz
+DOC_UPLOAD_DIR=$RELEASE_UPLOAD_BASE/documentation/$PACKAGE/reference
+
+# Make two tarballs with only the reference documentation.
+#
+# DOC_TAR_FILE_UNVERSIONED contains the files in directory DOC_VERSIONED/html.
+# There's a link from https://www.cairographics.org/cairomm
+# to DOC_UPLOAD_DIR/DOC_TAR_FILE_UNVERSIONED.
+#
+# DOC_TAR_FILE_VERSIONED contains the same files, but no directory name.
+# It's better suited for extraction in DOC_UPLOAD_DIR.
+rm -rf $DOC_VERSIONED
+mkdir $DOC_VERSIONED
+cp -a docs/reference/html $DOC_VERSIONED
+tar czf $DOC_TAR_FILE_UNVERSIONED $DOC_VERSIONED
+cd $DOC_VERSIONED/html
+tar czf ../../$DOC_TAR_FILE_VERSIONED .
+cd ../..
+
+# Upload both tarballs and extract DOC_TAR_FILE_VERSIONED.
+# The extracted files are stored in DOC_UPLOAD_DIR.
+scp $DOC_TAR_FILE_UNVERSIONED $DOC_TAR_FILE_VERSIONED $USERNAME@$RELEASE_UPLOAD_HOST:$DOC_UPLOAD_DIR
+ssh $USERNAME@$RELEASE_UPLOAD_HOST "cd $DOC_UPLOAD_DIR && tar xzf $DOC_TAR_FILE_VERSIONED"
diff --git a/tools/release-publish.sh b/tools/release-publish.sh
new file mode 100755
index 0000000..aae1986
--- /dev/null
+++ b/tools/release-publish.sh
@@ -0,0 +1,40 @@
+#!/bin/bash
+
+# Upload a cairomm tarball to cairographics.org/releases
+
+# Before you call this script, make a tarball with 'meson dist' or 'make distcheck'
+# as described at https://wiki.gnome.org/MaintainersCorner/Releasing
+# but DO NOT upload it to master.gnome.org.
+
+if [ $# -ne 2 ]
+then
+ echo "Usage: $0 <version> <username>"
+ echo "Example: $0 1.14.0 foo"
+ exit 1
+fi
+
+PACKAGE=cairomm
+VERSION=$1
+USERNAME=$2
+tar_file=$PACKAGE-$VERSION.tar.xz
+sha1_file=$tar_file.sha1
+gpg_file=$sha1_file.asc
+
+RELEASE_UPLOAD_HOST=cairographics.org
+RELEASE_UPLOAD_BASE=/srv/cairo.freedesktop.org/www
+RELEASE_UPLOAD_DIR=$RELEASE_UPLOAD_BASE/releases
+
+# Create a checksum file, and sign it.
+sha1sum $tar_file >$sha1_file
+echo "Please enter your GPG password to sign the checksum."
+gpg --armor --sign $sha1_file
+
+# Upload the tarball, checksum file and signature file.
+scp $tar_file $sha1_file $gpg_file $USERNAME@$RELEASE_UPLOAD_HOST:$RELEASE_UPLOAD_DIR
+
+# Update the LATEST-$PACKAGE link.
+ssh $USERNAME@$RELEASE_UPLOAD_HOST "rm -f $RELEASE_UPLOAD_DIR/LATEST-$PACKAGE-[0-9]* && ln -s $tar_file $RELEASE_UPLOAD_DIR/LATEST-$PACKAGE-$VERSION"
+
+# Move the files to a subdir.
+#mkdir -p releases
+#mv $tar_file $sha1_file $gpg_file releases