Skip to content

Commit

Permalink
[Extended] update-automation to rockcraft.yaml (#635)
Browse files Browse the repository at this point in the history
* Extended update-automation for rockcraft.yaml

* correct nested try-catch in updatesnapyaml and correct if-else block in action.yaml
  • Loading branch information
rudra-iitm authored Jun 20, 2024
1 parent 35eac21 commit 5c54c95
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
4 changes: 3 additions & 1 deletion action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,9 @@ runs:
fi
if [ -f output_file ]; then
echo "IS_CHANGE=true" >> $GITHUB_ENV
if [ -d snap ]; then
if [ -f rockcraft.yaml ]; then
mv output_file rockcraft.yaml
elif [ -d snap ]; then
mv output_file snap/snapcraft.yaml
else
mv output_file snapcraft.yaml
Expand Down
6 changes: 6 additions & 0 deletions updatesnap/updatesnapyaml.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,12 @@ def get_yaml_file(self, project_url):
data = self._github.get_file(project_url, yaml_path)
except (ValueError, ConnectionError):
data = None
if not data:
yaml_path = 'rockcraft.yaml'
try:
data = self._github.get_file(project_url, yaml_path)
except (ValueError, ConnectionError):
data = None
return data


Expand Down

0 comments on commit 5c54c95

Please sign in to comment.