Skip to content

Commit

Permalink
upgrade to conan 1.0
Browse files Browse the repository at this point in the history
  • Loading branch information
memsharded committed Feb 18, 2018
1 parent 76f5af4 commit 9c8204e
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 86 deletions.
16 changes: 2 additions & 14 deletions CMakeLists.txt
Expand Up @@ -104,30 +104,18 @@ if(NOT RANGE_V3_NEW_VERSION_HPP STREQUAL RANGE_V3_OLD_VERSION_HPP)
DESTINATION ${CMAKE_CURRENT_SOURCE_DIR}/include/range/v3
)
# Update the conanfiles, too
configure_file(conanfile.py.in ${CMAKE_CURRENT_SOURCE_DIR}/conanfile.py @ONLY)
configure_file(test_package/conanfile.py.in ${CMAKE_CURRENT_SOURCE_DIR}/test_package/conanfile.py @ONLY)
execute_process(
COMMAND ${GIT_EXECUTABLE} -C "${CMAKE_CURRENT_SOURCE_DIR}" add -u
)
execute_process(
COMMAND ${GIT_EXECUTABLE} -C "${CMAKE_CURRENT_SOURCE_DIR}" commit --amend --no-edit
)
execute_process(
COMMAND ${GIT_EXECUTABLE} -C "${CMAKE_CURRENT_SOURCE_DIR}" tag -f -a "${RANGE_V3_VERSION}" -m "${RANGE_V3_VERSION}"
)
find_program(CONAN_EXECUTABLE NAMES conan conan.exe)
if (NOT "x${CONAN_EXECUTABLE}" STREQUAL "xCONAN_EXECUTABLE-NOTFOUND")
message("Exporting conanfile for new version")
execute_process(
COMMAND ${CONAN_EXECUTABLE} export . ericniebler/stable
COMMAND ${CONAN_EXECUTABLE} create . range-v3/${RANGE_V3_VERSION}@ericniebler/stable
WORKING_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}"
)
endif()
message("Version updated to ${RANGE_V3_VERSION}. Don't forget to:")
message(" git push origin <feature-branch>")
message("and (after that is merged to master) then:")
message(" conan export ericniebler")
message(" conan test_package")
message(" conan create . range-v3/${RANGE_V3_VERSION}@ericniebler/stable")
message(" conan upload --all range-v3/${RANGE_V3_VERSION}@ericniebler/stable")
endif()

Expand Down
1 change: 0 additions & 1 deletion conanfile.py
Expand Up @@ -14,7 +14,6 @@

class Rangev3Conan(ConanFile):
name = "range-v3"
version = "0.3.5"
license = "Boost Software License - Version 1.0 - August 17th, 2003"
url = "https://github.com/ericniebler/range-v3"
description = """Experimental range library for C++11/14/17"""
Expand Down
25 changes: 0 additions & 25 deletions conanfile.py.in

This file was deleted.

11 changes: 3 additions & 8 deletions test_package/conanfile.py
Expand Up @@ -15,19 +15,14 @@
import os


channel = os.getenv("CONAN_CHANNEL", "stable")
username = os.getenv("CONAN_USERNAME", "ericniebler")


class Rangev3TestConan(ConanFile):
settings = "os", "compiler", "build_type", "arch"
requires = "range-v3/0.3.5@%s/%s" % (username, channel)
generators = "cmake"

def build(self):
cmake = CMake(self.settings)
self.run('cmake "%s" %s' % (self.conanfile_directory, cmake.command_line))
self.run("cmake --build . %s" % cmake.build_config)
cmake = CMake(self)
cmake.configure()
cmake.build()

def imports(self):
self.copy("*.dll", "bin", "bin")
Expand Down
38 changes: 0 additions & 38 deletions test_package/conanfile.py.in

This file was deleted.

0 comments on commit 9c8204e

Please sign in to comment.