From owner-svn-src-head@freebsd.org Fri Mar 30 19:08:38 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 1F935F5957D; Fri, 30 Mar 2018 19:08:38 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id C327778F65; Fri, 30 Mar 2018 19:08:37 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id B92BC500A; Fri, 30 Mar 2018 19:08:37 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w2UJ8bOh094347; Fri, 30 Mar 2018 19:08:37 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w2UJ8b5D094346; Fri, 30 Mar 2018 19:08:37 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201803301908.w2UJ8b5D094346@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Fri, 30 Mar 2018 19:08:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r331806 - head/release X-SVN-Group: head X-SVN-Commit-Author: gjb X-SVN-Commit-Paths: head/release X-SVN-Commit-Revision: 331806 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 30 Mar 2018 19:08:38 -0000 Author: gjb Date: Fri Mar 30 19:08:37 2018 New Revision: 331806 URL: https://svnweb.freebsd.org/changeset/base/331806 Log: Add logic for "families" for GCE images. This allows for GCE consumers to easily detect the latest major version of FreeBSD when using the gcloud command line utility. To ensure snapshot builds do not conflict with release-style builds (ALPHA, BETA, RC, RELEASE), the '-snap' suffix is appended to the GCE image family name. MFC after: 3 days Sponsored by: The FreeBSD Foundation Modified: head/release/Makefile.gce Modified: head/release/Makefile.gce ============================================================================== --- head/release/Makefile.gce Fri Mar 30 19:02:24 2018 (r331805) +++ head/release/Makefile.gce Fri Mar 30 19:08:37 2018 (r331806) @@ -18,8 +18,13 @@ CLEANFILES+= ${GCE_UPLOAD_TGTS} GCE_BUCKET?= +.if !defined(GCE_FAMILY) || empty(GCE_FAMILY) +GCE_FAMILY= ${TYPE:tl}-${REVISION:S,.,-,} +.endif + .if ${BRANCH} == "STABLE" || ${BRANCH} == "CURRENT" || ${BRANCH} == "PRERELEASE" SNAPSHOT_DATE!= date +-%Y-%m-%d +GCE_FAMILY_SUFX= -snap .endif # Really? Uppercase characters are not allowed? Sigh... @@ -64,6 +69,7 @@ gce-do-upload: /usr/local/bin/gsutil cp ${.OBJDIR}/${GCE_TARGET}.tar.gz \ gs://${GCE_BUCKET}/ /usr/local/bin/gcloud compute images create ${GCE_TARGET} \ + --family=${GCE_FAMILY}${GCE_FAMILY_SUFX} \ --source-uri gs://${GCE_BUCKET}/${GCE_TARGET}.tar.gz touch ${.OBJDIR}/${.TARGET}