2025-01-17 16:55:56 +01:00
|
|
|
#!/bin/bash -x
|
|
|
|
|
2025-01-18 09:26:46 +01:00
|
|
|
RELEASE_VERSION="1.0.2"
|
2025-01-17 16:55:56 +01:00
|
|
|
|
2025-01-18 09:48:22 +01:00
|
|
|
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
|
|
|
|
|
|
|
|
|
2025-01-17 16:55:56 +01:00
|
|
|
curl --netrc \
|
2025-01-18 10:12:43 +01:00
|
|
|
--upload-file target/$(rustc -vV | grep host | cut -d ' ' -f2)/release/$SRC_BINARY \
|
|
|
|
https://repos.mxhdr.net/api/packages/maxheadroom/generic/insta-import-pixelfed/$RELEASE_VERSION/$DST_BINARY
|