From 5b228448c5dcbeaf3f772395a62e72ace48f6fe6 Mon Sep 17 00:00:00 2001 From: Mokhtar Naamani Date: Mon, 13 Nov 2017 14:45:02 +0200 Subject: [PATCH] update license, readme and recipe - open source --- LICENSE | 21 +++++++++++++++++++ README.md | 5 +++-- conan_package/base.py | 7 ++++--- conan_package/release_fetches_source_https.py | 14 +++++++++++++ ...ource.py => release_fetches_source_ssh.py} | 2 +- conan_package/test_package/CMakeLists.txt | 2 +- sources/CMakeLists.txt | 2 +- 7 files changed, 45 insertions(+), 8 deletions(-) create mode 100644 LICENSE create mode 100644 conan_package/release_fetches_source_https.py rename conan_package/{release_fetches_source.py => release_fetches_source_ssh.py} (87%) diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000..5b7c3aa --- /dev/null +++ b/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2015-2017 JoyStream AS + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/README.md b/README.md index 6409fef..f6406ae 100644 --- a/README.md +++ b/README.md @@ -2,7 +2,7 @@ # ProtocolWire C++ wire library for the JoyStream extension protocol, as specified [here](http://#). -Current published release: `ProtocolWire/0.1.1@joystream/stable` +conan package name: `ProtocolWire/0.1.2@joystream/stable` ### Dependencies @@ -26,4 +26,5 @@ sh run_tests.sh ## License & Copyright -`...add later...` +JoyStream protocol_wire library is released under the terms of the MIT license. +See [LICENSE](LICENCE) for more information. diff --git a/conan_package/base.py b/conan_package/base.py index 9478818..3a2bdad 100644 --- a/conan_package/base.py +++ b/conan_package/base.py @@ -3,13 +3,14 @@ class ProtocolWireBase(ConanFile): name = "ProtocolWire" - version = "0.1.1" + version = "0.1.2" license = "(c) JoyStream Inc. 2016-2017" url = "https://github.com/JoyStream/protocol_wire-cpp.git" - git_repo = "git@github.com:JoyStream/protocol_wire-cpp.git" + repo_ssh_url = "git@github.com:JoyStream/protocol_wire-cpp.git" + repo_https_url = "https://github.com/JoyStream/protocol_wire-cpp.git" settings = "os", "compiler", "build_type", "arch" generators = "cmake" - requires = "Common/0.1.1@joystream/stable" + requires = "Common/0.1.2@joystream/stable" build_policy = "missing" def source(self): diff --git a/conan_package/release_fetches_source_https.py b/conan_package/release_fetches_source_https.py new file mode 100644 index 0000000..c071f59 --- /dev/null +++ b/conan_package/release_fetches_source_https.py @@ -0,0 +1,14 @@ +from base import ProtocolWireBase + +# Use this recipe when creating recipies for uploading to joystream conan repo on stable channel +# Source will be fetched from github repo + +class ProtocolWireRelease(ProtocolWireBase): + exports = "base.py" + + # make extra sure no sources are exported by base package + exports_sources = "" + + def source(self): + self.run("git clone %s repo" % self.repo_https_url) + self.run("cd repo && git checkout v%s" % self.version) diff --git a/conan_package/release_fetches_source.py b/conan_package/release_fetches_source_ssh.py similarity index 87% rename from conan_package/release_fetches_source.py rename to conan_package/release_fetches_source_ssh.py index d765df0..2e58731 100644 --- a/conan_package/release_fetches_source.py +++ b/conan_package/release_fetches_source_ssh.py @@ -10,5 +10,5 @@ class ProtocolWireRelease(ProtocolWireBase): exports_sources = "" def source(self): - self.run("git clone %s repo" % self.git_repo) + self.run("git clone %s repo" % self.repo_ssh_url) self.run("cd repo && git checkout v%s" % self.version) diff --git a/conan_package/test_package/CMakeLists.txt b/conan_package/test_package/CMakeLists.txt index 9d4a30f..a11fa7e 100644 --- a/conan_package/test_package/CMakeLists.txt +++ b/conan_package/test_package/CMakeLists.txt @@ -1,5 +1,5 @@ PROJECT(PackageTest) -cmake_minimum_required(VERSION 2.8.12) +cmake_minimum_required(VERSION 3.1 FATAL_ERROR) set(CMAKE_CXX_STANDARD 11) diff --git a/sources/CMakeLists.txt b/sources/CMakeLists.txt index 41e31ac..4f76819 100644 --- a/sources/CMakeLists.txt +++ b/sources/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 2.8.12 FATAL_ERROR) +cmake_minimum_required(VERSION 3.1 FATAL_ERROR) project(ProtocolWire CXX)