Skip to content

Commit

Permalink
build: shift typeless invocation into repo
Browse files Browse the repository at this point in the history
  • Loading branch information
feywind committed Sep 16, 2024
1 parent 08e250b commit e8d88ca
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 5 deletions.
12 changes: 9 additions & 3 deletions owlbot.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,16 +12,22 @@
# See the License for the specific language governing permissions and
# limitations under the License.

import synthtool.languages.node as node
from synthtool.languages import node
from synthtool import shell
from synthtool.log import logger

# Generate JS samples from TS.
node.typeless_samples_hermetic()
# node.typeless_samples_hermetic()

# We need to run this before the main owlbot processing, to make
# sure quickstart.js gets gts fixed before the README is generated.
# This needs to be worked out more properly, this is temporary.
logger.debug("Run typeless sample bot")
node.install()
node.fix()
shell.run(["npm", "run", "typeless"])

# node.fix()


# Main OwlBot processing.
node.owlbot_main(templates_excludes=[
Expand Down
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,8 @@
"predocs-test": "npm run docs",
"benchwrapper": "node bin/benchwrapper.js",
"prelint": "cd samples; npm link ../; npm install",
"precompile": "gts clean"
"precompile": "gts clean",
"typeless": "cd samples; npm run typeless"
},
"dependencies": {
"@google-cloud/paginator": "^5.0.0",
Expand Down
5 changes: 4 additions & 1 deletion samples/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,9 @@
"sampletsc": "cd typescript && tsc -p . && cd ..",
"compile": "npm run tsc && npm run sampletsc",
"clean": "gts clean && rm -rf build/",
"precompile": "npm run clean"
"precompile": "npm run clean",
"typeless": "typeless-sample-bot --outputpath . --targets . --recursive",
"posttypeless": "gts fix"
},
"dependencies": {
"@google-cloud/opentelemetry-cloud-trace-exporter": "^2.0.0",
Expand All @@ -35,6 +37,7 @@
},
"devDependencies": {
"@google-cloud/bigquery": "^7.0.0",
"@google-cloud/typeless-sample-bot": "^2.1.0",
"@types/chai": "^4.2.16",
"chai": "^4.2.0",
"gts": "^5.0.0",
Expand Down

0 comments on commit e8d88ca

Please sign in to comment.