From owner-svn-src-all@freebsd.org Mon Apr 2 13:25:39 2018 Return-Path: Delivered-To: svn-src-all@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 6158DF58F8A; Mon, 2 Apr 2018 13:25:39 +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 10B937E32E; Mon, 2 Apr 2018 13:25:39 +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 06EDC163CA; Mon, 2 Apr 2018 13:25:39 +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 w32DPcLO062068; Mon, 2 Apr 2018 13:25:38 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w32DPckT062067; Mon, 2 Apr 2018 13:25:38 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201804021325.w32DPckT062067@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Mon, 2 Apr 2018 13:25:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r331876 - in stable: 10/release 11/release X-SVN-Group: stable-10 X-SVN-Commit-Author: gjb X-SVN-Commit-Paths: in stable: 10/release 11/release X-SVN-Commit-Revision: 331876 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 02 Apr 2018 13:25:39 -0000 Author: gjb Date: Mon Apr 2 13:25:38 2018 New Revision: 331876 URL: https://svnweb.freebsd.org/changeset/base/331876 Log: MFC r331806: 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. Sponsored by: The FreeBSD Foundation Modified: stable/10/release/Makefile.gce Directory Properties: stable/10/ (props changed) Changes in other areas also in this revision: Modified: stable/11/release/Makefile.gce Directory Properties: stable/11/ (props changed) Modified: stable/10/release/Makefile.gce ============================================================================== --- stable/10/release/Makefile.gce Mon Apr 2 08:06:18 2018 (r331875) +++ stable/10/release/Makefile.gce Mon Apr 2 13:25:38 2018 (r331876) @@ -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}