Skip to content

Commit

Permalink
name_pretty validation
Browse files Browse the repository at this point in the history
  • Loading branch information
suztomo committed Sep 9, 2022
1 parent f0a182a commit 8523835
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
6 changes: 5 additions & 1 deletion generation/new_client/README.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,12 @@
# Script to create a new client library module in google-cloud-java monorepo

This tool is for repository maintainers only. Not for library users.

## Prerequisites

Use Linux environment
Use Linux environment.

Install Docker

### Checkout google-cloud-java repository

Expand Down
4 changes: 4 additions & 0 deletions generation/new_client/new-client.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
from pathlib import Path
import re
import subprocess
import sys

import click
from jinja2 import Environment, FileSystemLoader
Expand Down Expand Up @@ -139,6 +140,9 @@ def generate(
if proto_path is None:
proto_path = f"/google/cloud/{api_shortname}"

if name_pretty is "":
sys.exit("name_pretty is empty")

repo_metadata = {
"api_shortname": api_shortname,
"name_pretty": name_pretty,
Expand Down

0 comments on commit 8523835

Please sign in to comment.