From 79a48a88025fdff9b538000db24d8092712ef227 Mon Sep 17 00:00:00 2001 From: Donny Xia Date: Fri, 19 Jun 2020 10:52:56 -0700 Subject: [PATCH] Remove files --- releasing/VERSIONS | 33 ----------- releasing/releasemodule.sh | 109 ------------------------------------- 2 files changed, 142 deletions(-) delete mode 100644 releasing/VERSIONS delete mode 100755 releasing/releasemodule.sh diff --git a/releasing/VERSIONS b/releasing/VERSIONS deleted file mode 100644 index 641a5c11f..000000000 --- a/releasing/VERSIONS +++ /dev/null @@ -1,33 +0,0 @@ -#!/usr/bin/env bash - -# VERSIONS contains the release versions of each kustomize go module -# update this file and run releasemodule.sh to cut a new release - -# kyaml version -export kyaml_major=0 -export kyaml_minor=3 -export kyaml_patch=0 - -# kstatus version -export kstatus_major=0 -export kstatus_minor=0 -export kstatus_patch=1 - -# kustomize api version -export api_major=0 -export api_minor=4 -export api_patch=0 - -# cmd/config version -export cmd_config_major=0 -export cmd_config_minor=3 -export cmd_config_patch=0 - -# kustomize version -export kustomize_major=3 -export kustomize_minor=5 -export kustomize_patch=4 - -export pluginator_major=2 -export pluginator_minor=1 -export pluginator_patch=0 diff --git a/releasing/releasemodule.sh b/releasing/releasemodule.sh deleted file mode 100755 index 7b47230e3..000000000 --- a/releasing/releasemodule.sh +++ /dev/null @@ -1,109 +0,0 @@ -#!/bin/bash -# Copyright 2019 The Kubernetes Authors. -# SPDX-License-Identifier: Apache-2.0 - -# run this script with releasing/releasemodule.sh MODULE -# -- e.g. releasing/releasemodule.sh cmd/config -# to skip fetch from upstream, run with FETCH=false -# -- e.g. FETCH=false releasing/releasemodule.sh kyaml -set -e - -# perform release for a module -function releaseModule { - # calculate the branch and tag names - module=$1 - slash="/" - module_name=${module/$slash/_} - name="${module_name}_major" - major="${!name}" - name="${module_name}_minor" - minor="${!name}" - name="${module_name}_patch" - patch="${!name}" - branch="release-${module}-v${major}.${minor}" - tag="${module}/v${major}.${minor}.${patch}" - - # create a temporary workspace for our work - wktree=$(mktemp -d /tmp/kustomize-releases-XXXXXX) - git branch $branch upstream/$branch - git worktree add $wktree $branch # create a separate worktree for the branch - pushd . - cd $wktree/$module # cd into the worktree/module - - # merge master changes into the release branch - git merge upstream/master - - echo "dir: $wktree" - echo "module: $module v$major.$minor.$patch" - echo "branch: $branch" - echo "tag: $tag" - - # clean up replaces in go.mod as needed - FILE=fixgomod.sh - if test -f "$FILE"; then - ./fixgomod.sh - - go mod tidy - go test ./... - go mod tidy - git add . - git commit -m "update go.mod for release" || echo "no changes made to go.mod" - fi - - go test ./... - if [ "$NO_DRY_RUN" == "true" ]; then - git push upstream $branch - git tag -a $tag -m "Release $tag on branch $branch" - git push upstream $tag - else - printf "\nSkipping push module $module -- run with NO_DRY_RUN=true to push the release.\n\n" - fi - - # cleanup release artifacts - popd - rm -rf $wktree - git worktree prune - git branch -D $branch - - echo "$module complete" -} - -modules="kyaml api kstatus cmd/config cmd/resource cmd/kubectl pluginator kustomize" - -# configure the branch and tag names -module="${1?must provide the module to release as an argument: supported modules [$modules]}" - -# verify the module -found=false -for m in $modules; do - if [ "$m" == "$module" ]; then - found=true - fi -done -if [ "$found" != "true" ]; then - echo "unknown module \"$module\", must be one of: [$modules]" - exit 1 -fi - -# get the release versions -source releasing/VERSIONS - -FETCH=${FETCH:-"true"} -NO_DRY_RUN=${NO_DRY_RUN:-"false"} - -# get the most recent changes -if [ "$FETCH" == "true" ]; then - git fetch upstream -fi - -# release the module -releaseModule $module - -if [ "$module" == "kustomize" ]; then - # TODO: Do this for all modules - pushd . - getter=$(mktemp -d /tmp/kustomize-releases-XXXXXX) - cd $getter - go get sigs.k8s.io/kustomize/$module/v3 - popd -fi