From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 3F9DD158041 for ; Wed, 20 Mar 2024 21:45:24 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 326B1E29AB; Wed, 20 Mar 2024 21:45:22 +0000 (UTC) Received: from smtp.gentoo.org (woodpecker.gentoo.org [140.211.166.183]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 0A8CCE29AF for ; Wed, 20 Mar 2024 21:45:22 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id EDB0C335D60 for ; Wed, 20 Mar 2024 21:45:20 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 0ECB71592 for ; Wed, 20 Mar 2024 21:45:19 +0000 (UTC) From: "Matt Jolly" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Matt Jolly" Message-ID: <1710971092.b78a5ed24c78b4f55923164346b517eccf5e9390.kangie@gentoo> Subject: [gentoo-commits] proj/chromium-tools:master commit in: / X-VCS-Repository: proj/chromium-tools X-VCS-Files: bump-gn.sh X-VCS-Directories: / X-VCS-Committer: kangie X-VCS-Committer-Name: Matt Jolly X-VCS-Revision: b78a5ed24c78b4f55923164346b517eccf5e9390 X-VCS-Branch: master Date: Wed, 20 Mar 2024 21:45:19 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Archives-Salt: b80eccda-7369-4b87-a345-1b0e98d6c482 X-Archives-Hash: 14cc0eb2e2cbe55891388b96dd68c530 commit: b78a5ed24c78b4f55923164346b517eccf5e9390 Author: Matt Jolly gentoo org> AuthorDate: Wed Mar 20 21:44:52 2024 +0000 Commit: Matt Jolly gentoo org> CommitDate: Wed Mar 20 21:44:52 2024 +0000 URL: https://gitweb.gentoo.org/proj/chromium-tools.git/commit/?id=b78a5ed2 Add script to generate new gn version and tarball from git Signed-off-by: Matt Jolly gentoo.org> bump-gn.sh | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) diff --git a/bump-gn.sh b/bump-gn.sh new file mode 100755 index 0000000..1b49138 --- /dev/null +++ b/bump-gn.sh @@ -0,0 +1,29 @@ +#!/bin/bash + +# This script actually only creates an appropriately-versioned GN tarball to assist +# in the process of bumping the GN version. It does not actually bump the GN version +# in the gentoo tree as we need to upload the tarball to a devspace. + +# Users should set the following to make xz work: +# git config --global tar.tar.xz.command "xz -T0 -9 -c" + +# check if /tmp/gn exists and if so delete it +if [ -d /tmp/gn ]; then + rm -rf /tmp/gn +fi + +# Clone the gn repo +git clone https://gn.googlesource.com/gn /tmp/gn + +pushd /tmp/gn + +commit=$(git describe --tags) +pattern="([^-]*)-([^-]*)-([^-]*)-(.*)" +[[ $commit =~ $pattern ]] +count="${BASH_REMATCH[3]}" + +git archive --format=tar.xz --prefix=gn-0.${count}/ -o /tmp/gn-0.${count}.tar.xz HEAD + +popd + +echo "Tarball created at /tmp/gn-0.${count}.tar.xz"