2023-06-09 16:48:00 +02:00
|
|
|
// Copyright 2020 ko Build Authors All Rights Reserved.
|
|
|
|
//
|
|
|
|
// Licensed under the Apache License, Version 2.0 (the "License");
|
|
|
|
// you may not use this file except in compliance with the License.
|
|
|
|
// You may obtain a copy of the License at
|
|
|
|
//
|
|
|
|
// http://www.apache.org/licenses/LICENSE-2.0
|
|
|
|
//
|
|
|
|
// Unless required by applicable law or agreed to in writing, software
|
|
|
|
// distributed under the License is distributed on an "AS IS" BASIS,
|
|
|
|
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
|
|
// See the License for the specific language governing permissions and
|
|
|
|
// limitations under the License.
|
2020-12-22 19:31:02 +02:00
|
|
|
|
2024-06-10 06:04:56 +02:00
|
|
|
//go:generate go run ./cmd/help/main.go -d docs/reference/
|
2020-12-22 19:31:02 +02:00
|
|
|
package main
|
|
|
|
|
|
|
|
import (
|
2021-11-02 23:15:25 +02:00
|
|
|
"context"
|
2020-12-22 19:31:02 +02:00
|
|
|
"os"
|
2021-11-02 23:15:25 +02:00
|
|
|
"os/signal"
|
2020-12-22 19:31:02 +02:00
|
|
|
|
|
|
|
"github.com/google/ko/pkg/commands"
|
|
|
|
)
|
|
|
|
|
|
|
|
func main() {
|
2021-11-02 23:15:25 +02:00
|
|
|
ctx, stop := signal.NotifyContext(context.Background(), os.Interrupt)
|
|
|
|
defer stop()
|
|
|
|
if err := commands.Root.ExecuteContext(ctx); err != nil {
|
2023-01-04 22:49:57 +02:00
|
|
|
os.Exit(1)
|
2020-12-22 19:31:02 +02:00
|
|
|
}
|
|
|
|
}
|