Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .github/workflows/callable-flex-update.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,5 +47,8 @@ jobs:
git rm -q *.json
mv .github/flex-endpoint/*.json .
git add *.json
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

just after:

cp -a .github/flex-endpoint/archived .
git add archived/

and remove the rest?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yup, you nailed it - that worked. Thank you for pointing that out :)

# merge in new archived files
for file in ../flex_endpoint/archived/*/*.json; do mv "$file" "archived/$(basename $(dirname "$file"))/$(basename "$file")"; done
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

where does flex_endpoint come from?
shouldn't this be mkdir -p archived; mv .github/flex-endpoint/archived/*.json archived/ instead?

Copy link
Member Author

@weaverryan weaverryan Dec 17, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ha! Yes, sorry - you're right - this was a local testing path.

So I've added the mkdir -p archived (that was missing)Ha! Yes, sorry - you're right - this was a local testing path.

I've added the mkdir -p archived (that was missing). I've also fixed the path.

However, I don't think (EDIT: I confirmed it doesn't work) that the mv you suggested works because the .json files are in subdirectories - e.g. they are archived/symfony.twig-bundle.3.3/e13a79427495e670ef7a19f0e25fd13fbdd909d4.json. It IS very possible that my mv statement can be simplified, let me know if you have an idea :)

git add archived/*/*.json
git commit -m 'Update Flex endpoint' || true
git push origin -f flex/main