slackapi / deno-slack-hub

Connectors used to build coded workflows for Run on Slack apps using Deno
https://deno.land/x/deno_slack_hub
MIT License
9 stars 3 forks source link

Improve generation script #21

Closed WilliamBergamin closed 1 year ago

WilliamBergamin commented 1 year ago

Summary

This PR aims to improve the generation script by providing a more stable command to look up changed file after generating the typescript files.

In the last scheduled generation the script was unable to recognize that their were more then one changed files and did not created a PR for the generated files.

Testing:

  1. Pull this repo
  2. Make a change in src/connectors/mod.ts
  3. run the following sh command [[ $(git ls-files --other --modified --exclude-standard) == "src/connectors/mod.ts" ]] && { echo "No real changes. Do not commit."; exit 1; } -- the output should "No real changes. Do not commit."
  4. Make a change in another file in the repo
  5. run the following sh command [[ $(git ls-files --other --modified --exclude-standard) == "src/connectors/mod.ts" ]] && { echo "No real changes. Do not commit."; exit 1; } -- their should be no output

This generation GitHub action was triggered from this branch and shows that the changes work.

Requirements

WilliamBergamin commented 1 year ago

Merging this since it is a small change to the generation script and is blocking the release