Skip to content

Commit

Permalink
Add version metadata to packaging
Browse files Browse the repository at this point in the history
  • Loading branch information
loewexy committed Dec 27, 2019
1 parent 52050a4 commit 28abbfa
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 5 deletions.
6 changes: 3 additions & 3 deletions .travis/build-package.sh
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion .travis/deploy-release.sh
@@ -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}"
2 changes: 1 addition & 1 deletion .travis/deploy-snapshot.sh
@@ -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"
7 changes: 7 additions & 0 deletions utils/make-package.sh
Expand Up @@ -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"

Expand Down

0 comments on commit 28abbfa

Please sign in to comment.