Add version metadata to packaging

This commit is contained in:
Lukas Metzger 2019-12-27 12:22:26 +01:00
parent 52050a4298
commit 28abbfa356
4 changed files with 12 additions and 5 deletions

View file

@ -3,10 +3,10 @@
if test $TRAVIS_TAG
then
utils/make-package.sh pdnsmanager-${TRAVIS_TAG:1}
utils/make-package.sh pdnsmanager-$TRAVIS_COMMIT
utils/make-package.sh pdnsmanager-${TRAVIS_TAG:1} ${TRAVIS_TAG:1}
utils/make-package.sh pdnsmanager-$TRAVIS_COMMIT $TRAVIS_COMMIT
else
utils/make-package.sh pdnsmanager-$TRAVIS_COMMIT
utils/make-package.sh pdnsmanager-$TRAVIS_COMMIT $TRAVIS_COMMIT
fi
exit 0

View file

@ -1,3 +1,3 @@
#!/bin/bash
curl -F "file=@pdnsmanager-${TRAVIS_TAG:1}.tar.gz" -u "travis:$UPLOAD_PASS" 'https://upload.pdnsmanager.org/?action=release'
curl -F "file=@pdnsmanager-${TRAVIS_TAG:1}.tar.gz" -u "travis:$UPLOAD_PASS" "https://upload.pdnsmanager.org/?action=release&version=${TRAVIS_TAG:1}"

View file

@ -1,3 +1,3 @@
#!/bin/bash
curl -F "file=@pdnsmanager-$TRAVIS_COMMIT.tar.gz" -u "travis:$UPLOAD_PASS" 'https://upload.pdnsmanager.org/?action=snapshot'
curl -F "file=@pdnsmanager-$TRAVIS_COMMIT.tar.gz" -u "travis:$UPLOAD_PASS" "https://upload.pdnsmanager.org/?action=snapshot&version=$TRAVIS_COMMIT"

View file

@ -21,6 +21,13 @@ cd ..
cp LICENSE "$1"
cp README.md "$1"
# Add version info
cat << EOF > "$1"/version.json
{
"version": "$2"
}
EOF
# Create archive
tar -czf "$1".tar.gz "$1"