Skip to content

Commit

Permalink
Add deployment (#15)
Browse files Browse the repository at this point in the history
* Update .travis.yml

* Update README.md

* Update .travis.yml

* Update CMakeLists.txt

* Change travis build
  • Loading branch information
raldus authored Apr 18, 2017
1 parent a082f94 commit 7b6541c
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 6 deletions.
20 changes: 18 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,13 +36,29 @@ addons:
- libsdl-image1.2-dev

before_script:
- cmake -H. -Bbuild -DCMAKE_BUILD_TYPE=Release
- cmake -H. -Bbuild -DCMAKE_BUILD_TYPE=Release -DPACKAGE_DEPLOY=DEB -DPACKAGE_NUMBER=$TRAVIS_JOB_NUMBER

script:
- cmake --build build
- cmake --build build --target package

os:
- linux

before_deploy:
- export RELEASE_PKG_FILE=$(ls build/*.deb)
- echo "deploying $RELEASE_PKG_FILE to GitHub releases"

deploy:
provider: releases
api_key:
secure: RMb2gJiQuadQtMK7JXWpSur9S0Lxvo3GZ7rzzgHUxAdjnAne4oLbF0S7m2tZr4BGQehZS3+Juf2maDvS9NIjR5HmPIT1Xqq5xb1lqRrM4sMJfSvMI3T7CIkKsBRHjP7xiocHS1CF2uddTyqaogo+PMABup03gVlRB8MRsQj04sGnHnYSEj3OBL1L86rKOa2YRpOrtvwiLO3ZobpRvRLR9iAyqsZNmQIfqL04wsulJZ9N+IGwUmWNShx06ovXcbvXOiQ88nKsCHbTEr1DqnJ2RdJuHwGCEOEK1umktxNbomevfEELt2lIwTTGMd4T9oIkQVaD1OAciLcIOBfv9qRExBATLrlBx3JtdTIhY565aTqRFxcRvyL30VK7UDYK85JQnV7tK5bXYO+NyG2e19KHkzb1LJ3njD3I1Mq5+1qTpfnnaO8wfsuJYd6MgQmi8JN7QhpIG8XG+ltPiQPZBk6pZ866DwvunHY0GrBR4JQ3JaduU2227/+rvMxLc/jHiURFHLkKbvxeZSldoBDZwaIxXEhakcANngyTHYH8aC8gi7ZjXEHNTjIY22aAFP7amh83zSEZOroF3XI0Zu62etswLmLm01/oJqJin5t+rMEJHuqlXv9NWsg2jUioD20aJDZ1fqcEtvuSqYNF2XiNCTDXe82LH/QRCYo6a2Gyd3U43Sg=
file_glob: true
file: "${RELEASE_PKG_FILE}"
skip_cleanup: true
on:
tags: true
repo: raldus/roland
branch: master

notifications:
on_success: change
Expand Down
6 changes: 3 additions & 3 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ math(EXPR CMAKE_BITS ${CMAKE_SIZEOF_VOID_P}*8)

set(PACKAGE_TITLE "Roland" CACHE STRING "Package Title")
set(PACKAGE_NAME "roland" CACHE STRING "Package Name")
set(PACKAGE_DEPLOY "RPM;DEB" CACHE STRING "Package deploy")

if (NOT EXISTS "${CMAKE_SOURCE_DIR}/version")
execute_process(COMMAND git show --tags --quiet --reverse "--pretty=format:%ad %n[view tag](https://github.com/raldus/roland/commit/%H) %n%n***%n" OUTPUT_FILE "${CMAKE_SOURCE_DIR}/CHANGELOG.md")
Expand Down Expand Up @@ -172,12 +173,11 @@ set(ROLAND_PIXMAPS_DIR "${ROLAND_DATADIR}")
set(CPACK_CMAKE_GENERATOR "Unix Makefiles")
set(CPACK_GENERATOR "STGZ;TGZ;TZ")
set(CPACK_INSTALL_CMAKE_PROJECTS "${CMAKE_BINARY_DIR};${PACKAGE_NAME};ALL;/")
set(CPACK_NSIS_DISPLAY_NAME "${PACKAGE_TITLE} ${PACKAGE_VERSION} ${CMAKE_BUILD_TYPE}")
set(CPACK_OUTPUT_CONFIG_FILE "${CMAKE_BINARY_DIR}/CPackConfig.cmake")
set(CPACK_PACKAGE_DESCRIPTION_FILE "${CMAKE_SOURCE_DIR}/README.md")
set(CPACK_PACKAGE_DESCRIPTION_SUMMARY "Amstrad Emulator based on Caprice Source rewritten in C++")
set(CPACK_PACKAGE_EXECUTABLES "${PACKAGE_NAME};${PACKAGE_TITLE}")
set(CPACK_PACKAGE_FILE_NAME "${PACKAGE_NAME}-${PACKAGE_VERSION}")
set(CPACK_PACKAGE_FILE_NAME "${PACKAGE_NAME}-${PACKAGE_VERSION}_${PACKAGE_NUMBER}")
set(CPACK_PACKAGE_INSTALL_DIRECTORY "${PACKAGE_NAME}-${PACKAGE_VERSION}")
set(CPACK_PACKAGE_INSTALL_REGISTRY_KEY "${PACKAGE_NAME}-${PACKAGE_VERSION}")
set(CPACK_PACKAGE_NAME ${PACKAGE_NAME})
Expand Down Expand Up @@ -216,7 +216,7 @@ set(CPACK_NSIS_DISPLAY_NAME "${PACKAGE_TITLE}")
set(CPACK_NSIS_CONTACT "development@rolandemu.de")

if(UNIX)
set(CPACK_GENERATOR "RPM;DEB")
set(CPACK_GENERATOR "${PACKAGE_DEPLOY}")
else()
set(CPACK_GENERATOR "NSIS")
endif()
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
Roland is an emulator of the homecomputers Amstrad/Schneider from the series CPC 464/664/6128
for Linux und Windows.
Roland depends on SDL > 1.2 and SDL-Image.
For further information visit https://www.rolandemu.de/index.html
For further information visit https://www.rolandemu.de/

## Build
The source is written in c++11 code and needs at leat a c++11 enabled Compiler. Supported are GCC native, Visual Studio 2015 or CygWin/MinGw.
Expand Down

0 comments on commit 7b6541c

Please sign in to comment.