Skip to content

Commit

Permalink
Autoregister dblsqd release (Mudlet#2065)
Browse files Browse the repository at this point in the history
This installs the dblsq CLI on all CI platforms and registers deployed binaries in the release, if the current build is a tagged one.
  • Loading branch information
keneanung authored Oct 19, 2018
1 parent cb7c2f2 commit 61649b6
Show file tree
Hide file tree
Showing 6 changed files with 28 additions and 26 deletions.
4 changes: 4 additions & 0 deletions .appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,10 @@ environment:
secure: 81sr0SJzuWG+mgH3X6fJTh4rfX5/O1qa3MsItNvFukQ=
DEPLOY_PATH:
secure: XQhASAJJm4Owpu74K4jgL0gszN59XJnCAS27NG7CW5G1LSRSWRh/EhKiTD36DvSr
DBLSQD_USER:
secure: MzfNcBLZRfswzBQufoW4EV+9/tcG5vW+G6EVTyN6Glc=
DBLSQD_PASS:
secure: Bm5PLJjC39XmRC55RPGVP9c5CFxvWu2VorAAmu5QS38=
matrix:
- QT_BASE_DIR: C:\Qt\5.11\mingw53_32
install:
Expand Down
8 changes: 6 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,12 +27,15 @@ addons:
- lua-sql-sqlite3
- libpugixml-dev
- xz-utils
- npm
env:
global:
- secure: VFI3UCiDrp47WTcUhsatdQvvWg+3gk00eBMZgSOXXKY5+hk+NOX7bOFcIM5t9nlZDbpHDr10SFTuUOw+PeWmLpFO06Zrjg86M9jm9WS4i8Cs9hfxoT6H4isXlR1vubX2LmNlHyzg8WtdNanlsufgecyaGksJxr7tVhG/cWyD6yo=
- secure: XxdhHVraWpXpWo4tluD7NwJtqQT1b6LKoxX6QWKzR0fvcKgqBy2jlXMu0KVtTYtVI7M1wFdjtwSixK1UGFZyDgEYYUnDTufq7E81TWJSQ5ZhxNRaDAyO2vkLNFpH7LkwVrV/fWCPKE9t3/WiowwQnXesm9MMxAzbd2mIaeyiccY=
- secure: mi62VU0KxOahOaYulrqDiow3SscJPug842vhnuXzfjJ5AJU5V5gAcvECL85gQIPx5W3dXoNJnHdBUi9jOhnE3tuTML67oiieoVEmZfFF2pXtnHsdFlvzFtcGcmT+cVGF7GVyItlVLa5LcLJw6SNd3C3Dhib/Lu1cb/NdsFn0sZc=
- secure: CaZAZW5shaYve0gauA0rdRn/Bxdf5itfAFb7FuaOHmk999AQ/aB013huCcdeeBDhon2CxQ3BRLTkRzHR00DBA7rPgR1Y/4/kHa71xisUY7CqDlHYktQI69CpqGot2Bb1eE2Rs7ZQcYKhfMbMJacE6zNBZwUq0I0OWI1Ux3PKkJs=
- secure: bbgK1psr0ZUYPJanjnyzsbkQk2QHLkS39iiycnb4GVUUlNKRcdxqEFqoVFssOKvrQQr2RVe/k8RSb9D57KiCiQaAqksnmGJ9nTDNiNJefgTO+bTjGVIzBSyMyLDX/ltQkyHm5bBF48+64sAv5jYkbfgfj9H0/ihtwt6wqh5AdJQ=
- secure: N4fBA3ul3DBM0/RJjQ+R64EGoQb9AaKmvgyFq9TdTT4JQ2TB956yHq/iwOfnYAjY0zW238lWE1n+mlQlKwW7MrOPlZylsKO1oBTjEkm8d7SezPnLZWPBB5tGv1wrWOcI+k1nYFPPRFtTopcCwvLyFoN7d/Z7ViuqNAK8QSzCKps=
git:
submodules: false # We selectively pull in the wanted submodules ourselves now
matrix:
Expand Down Expand Up @@ -114,11 +117,12 @@ matrix:
before_install:
- if [ "${TRAVIS_OS_NAME}" = "linux" ]; then echo -n | openssl s_client -connect scan.coverity.com:443 | sed -ne '/-BEGIN CERTIFICATE-/,/-END CERTIFICATE-/p' | tee -a "${HOME}/ca-file.pem"; fi
# add to the path here to pick up things as soon as its installed
- if [ "${TRAVIS_OS_NAME}" = "linux" ]; then export PATH="${HOME}/latest-gcc-symlinks:$PATH"; fi
- if [ "${TRAVIS_OS_NAME}" = "linux" ]; then export PATH="${HOME}/.npm-global/bin:${HOME}/latest-gcc-symlinks:$PATH"; fi
- if [ "${TRAVIS_OS_NAME}" = "linux" ]; then source "/opt/qt${QT_VERSION}/bin/qt${QT_VERSION}-env.sh"; fi
- if [ "${TRAVIS_OS_NAME}" = "linux" ]; then eval $(luarocks path); fi
- if [ "${TRAVIS_OS_NAME}" = "osx" ]; then PATH="/usr/local/opt/ccache/libexec:/usr/local/opt/qt5/bin:$PATH"; fi
- if [ "${TRAVIS_OS_NAME}" = "osx" ]; then PATH="${HOME}/.npm-global/bin:/usr/local/opt/ccache/libexec:/usr/local/opt/qt5/bin:$PATH"; fi
- ./CI/travis.before_install.sh
- export NPM_CONFIG_PREFIX="${HOME}/.npm-global"
install: source CI/travis.install.sh
before_script: |
# source the set-build-info as it exports some variables for us!
Expand Down
24 changes: 3 additions & 21 deletions CI/appveyor.after_success.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -67,27 +67,9 @@ if ("$Env:APPVEYOR_REPO_TAG" -eq "false") {
$session.Close()
$session.Dispose()
$DEPLOY_URL="http://www.mudlet.org/wp-content/files/Mudlet-${Env:VERSION}-windows-installer.exe"

<#
This is the shell version:
# add ssh-key to ssh-agent for deployment
# shellcheck disable=2154
# the two "undefined" variables are defined by travis
openssl aes-256-cbc -K "${encrypted_70dbe4c5e427_key}" -iv "${encrypted_70dbe4c5e427_iv}" -in "${TRAVIS_BUILD_DIR}/CI/mudlet-deploy-key.enc" -out /tmp/mudlet-deploy-key -d
eval "$(ssh-agent -s)"
chmod 600 /tmp/mudlet-deploy-key
ssh-add /tmp/mudlet-deploy-key
bash make-installer.sh -r "${VERSION}"
chmod +x "Mudlet.AppImage"
tar -czvf "Mudlet-${VERSION}-linux-x64.AppImage.tar" "Mudlet.AppImage"
scp -i /tmp/mudlet-deploy-key -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null "Mudlet-${VERSION}-linux-x64.AppImage.tar" "keneanung@mudlet.org:${DEPLOY_PATH}"
DEPLOY_URL="http://www.mudlet.org/wp-content/files/Mudlet-${VERSION}-linux-x64.AppImage.tar"
fi #>

npm install -g dblsqd-cli
dblsqd login -e "https://api.dblsqd.com/v1/jsonrpc" -u "${Env:DBLSQD_USER}" -p "${Env:DBLSQD_PASS}"
dblsqd push -a mudlet -c release -r "${Env:VERSION}" -s mudlet --type "standalone" --attach win:x86 "${DEPLOY_URL}"
}

if (Test-Path Env:APPVEYOR_PULL_REQUEST_NUMBER) {
Expand Down
10 changes: 8 additions & 2 deletions CI/travis.linux.after_success.sh
Original file line number Diff line number Diff line change
Expand Up @@ -70,12 +70,18 @@ if [ "${Q_OR_C_MAKE}" = "qmake" ] && [ "${CC}" = "gcc" ]; then

scp -i /tmp/mudlet-deploy-key -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null "Mudlet-${VERSION}-linux-x64.AppImage.tar" "keneanung@mudlet.org:${DEPLOY_PATH}"
DEPLOY_URL="http://www.mudlet.org/wp-content/files/Mudlet-${VERSION}-linux-x64.AppImage.tar"



# Install dblsqd in know place
npm install -g dblsqd-cli
dblsqd login -e "https://api.dblsqd.com/v1/jsonrpc" -u "${DBLSQD_USER}" -p "${DBLSQD_PASS}"
dblsqd push -a mudlet -c release -r "${VERSION}" -s mudlet --type "standalone" --attach linux:x86_64 "${DEPLOY_URL}"

# generate and deploy source tarball
cd "${HOME}"
# get the archive script
wget https://raw.githubusercontent.com/meitar/git-archive-all.sh/master/git-archive-all.sh

cd "${TRAVIS_BUILD_DIR}"
# generate and upload the tarball
bash "${HOME}/git-archive-all.sh" "Mudlet-${VERSION}.tar"
Expand Down
2 changes: 1 addition & 1 deletion CI/travis.linux.install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -25,4 +25,4 @@ if [ "${TRAVIS_EVENT_TYPE}" = "cron" ]; then
echo The new PATH is now "${PATH}"
cd ..
# Coverity scan tool installed
fi
fi
6 changes: 6 additions & 0 deletions CI/travis.osx.after_success.sh
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ if [ "${Q_OR_C_MAKE}" = "qmake" ] && [ "${CC}" = "clang" ]; then
fi

DEPLOY_URL=$(wget --method PUT --body-file="${HOME}/Desktop/${appBaseName}.dmg" "https://transfer.sh/${appBaseName}.dmg" -O - -q)

else # release build

# add ssh-key to ssh-agent for deployment
Expand All @@ -68,6 +69,11 @@ if [ "${Q_OR_C_MAKE}" = "qmake" ] && [ "${CC}" = "clang" ]; then

scp -i /tmp/mudlet-deploy-key -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null "${HOME}/Desktop/Mudlet-${VERSION}.dmg" "keneanung@mudlet.org:${DEPLOY_PATH}"
DEPLOY_URL="http://www.mudlet.org/wp-content/files/Mudlet-${VERSION}.dmg"

# install dblsqd. NPM must be available here because we use it to install the tool that creates the dmg
npm install -g dblsqd-cli
dblsqd login -e "https://api.dblsqd.com/v1/jsonrpc" -u "${DBLSQD_USER}" -p "${DBLSQD_PASS}"
dblsqd push -a mudlet -c release -r "${VERSION}" -s mudlet --type "standalone" --attach mac:x86_64 "${DEPLOY_URL}"
fi

# delete keychain just in case
Expand Down

0 comments on commit 61649b6

Please sign in to comment.