Skip to content

Commit

Permalink
chore: updates entrypoint scripts
Browse files Browse the repository at this point in the history
Signed-off-by: Jennifer Power <[email protected]>
  • Loading branch information
jpower432 committed Oct 11, 2023
1 parent de98894 commit ca8d1f7
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 5 deletions.
1 change: 1 addition & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@ RUN microdnf install -y git \
&& microdnf clean all \
&& rm -rf /var/lib/apt/lists/*

# Add wrappers for entrypoints that provide support the actions
COPY ./actions/autosync/auto-sync-entrypoint.sh /
RUN chmod +x /auto-sync-entrypoint.sh

Expand Down
2 changes: 1 addition & 1 deletion actions/autosync/auto-sync-entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ else
fi

# Initialize the command variable
command="python3.9 -m trestlebot \
command="trestlebot-autosync \
--markdown-path=\"${INPUT_MARKDOWN_PATH}\" \
--oscal-model=\"${INPUT_OSCAL_MODEL}\" \
--ssp-index-path=\"${INPUT_SSP_INDEX_PATH}\" \
Expand Down
2 changes: 1 addition & 1 deletion actions/rules-transform/rules-transform-entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ else
fi

# Initialize the command variable
command="python3.9 /trestle-bot/trestlebot/entrypoints/rules-tranform.py \
command="trestlebot-rules-transform \
--rules-view-path=\"${INPUT_RULES_VIEW_PATH}\" \
--commit-message=\"${INPUT_COMMIT_MESSAGE}\" \
--pull-request-title=\"${INPUT_PULL_REQUEST_TITLE}\" \
Expand Down
4 changes: 2 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ readme = 'README.md'
repository = 'https://github.com/RedHatProductSecurity/trestle-bot'

[tool.poetry.scripts]
autosync = "trestlebot.entrypoints.autosync:main"
rules-transform = "trestlebot.entrypoints.rule_transform:main"
trestlebot-autosync = "trestlebot.entrypoints.autosync:main"
trestlebot-rules-transform = "trestlebot.entrypoints.rule_transform:main"

[tool.poetry.dependencies]
python = '^3.8.1'
Expand Down
2 changes: 1 addition & 1 deletion trestlebot/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
# License for the specific language governing permissions and limitations
# under the License.

# Default entrypoint for trestlebot is autosync mode
# Default entrypoint for trestlebot is autosync mode when run with python -m trestlebot

from trestlebot.entrypoints.autosync import main as autosync_main

Expand Down

0 comments on commit ca8d1f7

Please sign in to comment.