Skip to content

Commit

Permalink
Migrate to conandata.yml (#19)
Browse files Browse the repository at this point in the history
  • Loading branch information
offa committed Dec 12, 2023
1 parent 71f011c commit 07f1928
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,4 +33,4 @@ jobs:
conan profile detect
- name: Build
run: |
conan create . --build=missing -o shared=${{ matrix.shared }}
conan create . --build=missing -o shared=${{ matrix.shared }} --version="0.5.2"
4 changes: 4 additions & 0 deletions conandata.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
sources:
"0.5.2":
url: "https://github.com/mrtazz/restclient-cpp/archive/refs/tags/0.5.2.tar.gz"
sha256: "d62ba618f9a938652fd53b483289e8662a99451839e59058c8beb286dfbc65ec"
8 changes: 2 additions & 6 deletions conanfile.py
Original file line number Diff line number Diff line change
@@ -1,12 +1,10 @@
from conan import ConanFile
from conan.tools.cmake import CMake
from conan.tools.files import collect_libs, copy
from conan.tools.scm import Git
from conan.tools.files import collect_libs, copy, get


class RestclientcppConan(ConanFile):
name = "restclient-cpp"
version = "0.5.2"
license = "MIT"
author = "offa <offa@github>"
url = "https://github.com/offa/conan-restclient-cpp"
Expand All @@ -26,9 +24,7 @@ def _configure_cmake(self):
return cmake

def source(self):
git = Git(self)
git.clone(url=(self.homepage + ".git"), target=".")
git.checkout(commit=self.version)
get(self, **self.conan_data["sources"][self.version], strip_root=True)

def build(self):
cmake = self._configure_cmake()
Expand Down

0 comments on commit 07f1928

Please sign in to comment.