diff --git a/.appveyor.yml b/.appveyor.yml index 4df48677..e8250919 100644 --- a/.appveyor.yml +++ b/.appveyor.yml @@ -14,13 +14,13 @@ skip_commits: - '*.md' - Dockerfile - LICENSE - + image: Visual Studio 2015 cache: - c:\protobuf-release - c:\zlib-release - + environment: matrix: - qt_ver: 5.9\msvc2015_64 @@ -35,7 +35,7 @@ environment: cmake_generator: Visual Studio 14 2015 cmake_toolset: v140 target_arch: x86 - + install: - ps: | if (Test-Path c:\protobuf-release) { @@ -56,10 +56,10 @@ install: cmake . -G "$env:cmake_generator" -T "$env:cmake_toolset" -DCMAKE_INSTALL_PREFIX=c:/zlib-release msbuild INSTALL.vcxproj /p:Configuration=Release } - + services: - mysql - + build_script: - ps: | New-Item -ItemType directory -Path $env:APPVEYOR_BUILD_FOLDER\build @@ -83,17 +83,35 @@ build_script: test: off + +# Builds for pull requests skip the deployment step altogether deploy: - provider: GitHub - auth_token: - secure: p+7wPVry2XEa6TBm9XH8IaQZbBmXQ/J2ldbGmcIxUZD3NkkPrSRRlmE7Of1CBBIO - description: "Dev build of Cockatrice" - artifact: /.*\.exe/ - draft: false - prerelease: true - force_update: true - on: - appveyor_repo_tag: true +# Deploy configuration for "beta" releases + - provider: GitHub + auth_token: + secure: p+7wPVry2XEa6TBm9XH8IaQZbBmXQ/J2ldbGmcIxUZD3NkkPrSRRlmE7Of1CBBIO + release: "Cockatrice $APPVEYOR_REPO_TAG_NAME" + description: "Beta release of Cockatrice" + artifact: /.*\.exe/ + force_update: true + draft: false + prerelease: true + on: + APPVEYOR_REPO_TAG: true + APPVEYOR_REPO_TAG_NAME: /([0-9]|[1-9][0-9])(\.([0-9]|[1-9][0-9])){2}-beta(\.([2-9]|[1-9][0-9]))?$/ # regex to match semver naming convention for beta pre-releases + +# Deploy configuration for "stable" releases + - provider: GitHub + auth_token: + secure: p+7wPVry2XEa6TBm9XH8IaQZbBmXQ/J2ldbGmcIxUZD3NkkPrSRRlmE7Of1CBBIO + artifact: /.*\.exe/ + force_update: true + draft: false + prerelease: false + on: + APPVEYOR_REPO_TAG: true + APPVEYOR_REPO_TAG_NAME: /([0-9]|[1-9][0-9])(\.([0-9]|[1-9][0-9])){2}$/ # regex to match semver naming convention for stable full releases + # official validator for ".appveyor.yml" config file: https://ci.appveyor.com/tools/validate-yaml # appveyor config documentation: https://www.appveyor.com/docs/build-configuration/ diff --git a/.travis.yml b/.travis.yml index d9f0bfeb..9debf4c8 100644 --- a/.travis.yml +++ b/.travis.yml @@ -35,19 +35,41 @@ install: bash ./.travis/travis-dependencies.sh script: bash ./.travis/travis-compile.sh + +# Builds for pull requests skip the deployment step altogether deploy: - provider: releases - api_key: - secure: "mLMF41q7xgOR1sjczsilEy7HQis2PkZCzhfOGbn/8FoOQnmmPOZjrsdhn06ZSl3SFsbfCLuClDYXAbFscQmdgjcGN5AmHV+JYfW650QEuQa/f4/lQFsVRtEqUA1O3FQ0OuRxdpCfJubZBdFVH8SbZ93GLC5zXJbkWQNq+xCX1fU=" - file_glob: true - file: "build/Cockatrice-*" - prerelease: true - skip_cleanup: true - overwrite: true - on: - tags: true - repo: Cockatrice/Cockatrice - condition: $BUILDTYPE = Release +# Deploy configuration for "beta" releases + - provider: releases + api_key: + secure: mLMF41q7xgOR1sjczsilEy7HQis2PkZCzhfOGbn/8FoOQnmmPOZjrsdhn06ZSl3SFsbfCLuClDYXAbFscQmdgjcGN5AmHV+JYfW650QEuQa/f4/lQFsVRtEqUA1O3FQ0OuRxdpCfJubZBdFVH8SbZ93GLC5zXJbkWQNq+xCX1fU= + skip_cleanup: true + name: "Cockatrice $TRAVIS_TAG" + body: "Beta release of Cockatrice" + file_glob: true + file: "build/Cockatrice-*" + overwrite: true + draft: false + prerelease: true + on: + tags: true + repo: Cockatrice/Cockatrice + condition: $BUILDTYPE = Release && $TRAVIS_TAG =~ ([0-9]|[1-9][0-9])(\.([0-9]|[1-9][0-9])){2}-beta(\.([2-9]|[1-9][0-9]))?$ # regex to match semver naming convention for beta pre-releases + +# Deploy configuration for "stable" releases + - provider: releases + api_key: + secure: mLMF41q7xgOR1sjczsilEy7HQis2PkZCzhfOGbn/8FoOQnmmPOZjrsdhn06ZSl3SFsbfCLuClDYXAbFscQmdgjcGN5AmHV+JYfW650QEuQa/f4/lQFsVRtEqUA1O3FQ0OuRxdpCfJubZBdFVH8SbZ93GLC5zXJbkWQNq+xCX1fU= + skip_cleanup: true + file_glob: true + file: "build/Cockatrice-*" + overwrite: true + draft: false + prerelease: false + on: + tags: true + repo: Cockatrice/Cockatrice + condition: $BUILDTYPE = Release && $TRAVIS_TAG =~ ([0-9]|[1-9][0-9])(\.([0-9]|[1-9][0-9])){2}$ # regex to match semver naming convention for stable full releases + notifications: webhooks: @@ -56,6 +78,7 @@ notifications: on_success: change on_failure: change on_start: never - + + # official validator for ".travis.yml" config file: https://yaml.travis-ci.org # travis config documentation: https://docs.travis-ci.com/user/customizing-the-build diff --git a/cmake/getversion.cmake b/cmake/getversion.cmake index 5258c48b..4577e9c9 100644 --- a/cmake/getversion.cmake +++ b/cmake/getversion.cmake @@ -86,7 +86,7 @@ function(get_tag_name commit) # Sanity checks: length list(LENGTH GIT_TAG_EXPLODED GIT_TAG_LISTCOUNT) - if(${GIT_TAG_LISTCOUNT} LESS 7 OR ${GIT_TAG_LISTCOUNT} GREATER 8) + if(${GIT_TAG_LISTCOUNT} LESS 7 OR ${GIT_TAG_LISTCOUNT} GREATER 9) message(WARNING "Invalid tag format, got ${GIT_TAG_LISTCOUNT} tokens") return() endif()