#!/bin/bash # Copyright (c) 2013 The CoreOS Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. SCRIPT_ROOT=$(dirname $(readlink -f "$0")) . "${SCRIPT_ROOT}/common.sh" || exit 1 DEFINE_integer build "${TODAYS_VERSION}" \ "Branch name (aka 'build'), should be days since 2013-7-1" DEFINE_integer branch 0 "Branch revision, should be 0" DEFINE_string patch 0 "Branch patch id, should be 0" DEFINE_string track "dev-channel" "Set the given track to this new branch" DEFINE_string sdk_version "${COREOS_VERSION_STRING}" "Set the SDK build to use" DEFINE_boolean push ${FLAGS_FALSE} "Push to public manifest repository." DEFINE_string remote "origin" "Remote name or URL to push to." # Parse flags FLAGS "$@" || exit 1 eval set -- "${FLAGS_ARGV}" switch_to_strict_mode BRANCH_NAME="build-${FLAGS_build}" TAG_NAME="v${FLAGS_build}.${FLAGS_branch}.${FLAGS_patch}" cd "${GCLIENT_ROOT}/.repo/manifests" # Clean up existing branch manifest(s) if [[ $(ls branch-*.xml 2>/dev/null) ]]; then for old_branch in branch-*.xml; do if [[ "${old_branch}" != "${BRANCH_NAME}.xml" ]]; then git rm -f "${old_branch}" fi done fi repo manifest -o "${BRANCH_NAME}.xml" -r tee version.txt <