deb-simple/ci/package.sh

15 lines
680 B
Bash

#!/usr/bin/env bash
curl -s -X POST -F "file=@debian/changelog" -F "name=deb-simple" -F "version=$DEB_SIMPLE_VERSION" -F "author=Gitlab CI" -F "email=gitlab@knightswarm.com" -F "changes[]=Auto build for $CI_BUILD_REF" https://api.meow.tf/changelog/update > debian/changelog
if [ ! -z "$GITLAB_CI_PUT_URL" ]; then
curl -s -X PUT -F "file_path=debian/changelog" -F branch_name=master -F "commit_message=[ci skip] Update changelog for $CI_BUILD_REF" -F "content=<debian/changelog" $GITLABCI_PUT_URL
fi
chmod +x debian/rules
fakeroot debian/rules clean binary
if [ ! -z "$UPLOAD_URL" ]; then
FILE=`ls ./build | head -n 1`
curl -s -X POST "$UPLOAD_URL" -F "file=@build/$FILE"
fi