msys2 / msys2-autobuild

🏭🏭🏭🏭🏭🏭🏭🏭
https://packages.msys2.org/queue
MIT License
35 stars 25 forks source link

GitHub doesn't allow '~' in asset names #15

Closed lazka closed 4 years ago

lazka commented 4 years ago

We currently have mintty in the queue which has an epoch set, so the version is 1~3.3.0-1. GitHub normalizes that to 1.3.3.0-1, so it is never considered done.

lazka commented 4 years ago

Maybe we can use the label to encode the real filename. I need to test that with the API.

eine commented 4 years ago

Maybe we can use the label to encode the real filename. I need to test that with the API.

Yes. E.g., in eine/tip, the label is not used when uploading the asset (https://github.com/eine/tip/blob/master/tip.py#L119). However, label is an optional argument. Then, the name and label are set to the same value (https://github.com/eine/tip/blob/master/tip.py#L123), but it is possible to rename the file and set a different label.

jeremyd2019 commented 4 years ago

I hit that too. I just renamed such files before adding them to the pacman db.

# work around github issue with ~ in file name (turns into .)
for a in *~*; do
    mv "$a" "`tr '~' '.' <<<"$a"`"
done

That being said, I'd be interested to see a better solution.