make package WIndows-aware
This commit is contained in:
parent
6d2a4aa625
commit
3fd33e9825
1 changed files with 12 additions and 0 deletions
12
package.sh
12
package.sh
|
@ -2,6 +2,18 @@
|
|||
|
||||
RELEASE_VERSION="1.0.2"
|
||||
|
||||
PLATFORM=$(rustc -vV | grep host | cut -d ' ' -f2)
|
||||
|
||||
# Set the BINARY variable based on the content of PLATFORM
|
||||
if [[ "$PLATFORM" == *"windows"* ]]; then
|
||||
SRC_BINARY="pixelfed_batch_uploader.exe"
|
||||
DST_BINARY="$PLATFORM_$SRC_BINARY"
|
||||
else
|
||||
SRC_BINARY="pixelfed_batch_uploader"
|
||||
DST_BINARY="$SRC_BINARY.$PLATFORM"
|
||||
fi
|
||||
|
||||
|
||||
curl --netrc \
|
||||
--upload-file target/$(rustc -vV | grep host | cut -d ' ' -f2)/release/pixelfed_batch_uploader \
|
||||
https://repos.mxhdr.net/api/packages/maxheadroom/generic/insta-import-pixelfed/$RELEASE_VERSION/pixelfed_batch_uploader.$(rustc -vV | grep host | cut -d ' ' -f2)
|
||||
|
|
Loading…
Reference in a new issue