Movatterモバイル変換


[0]ホーム

URL:


Skip to content
DEV Community
Log in Create account

DEV Community

Kien Nguyen Chi
Kien Nguyen Chi

Posted on

     

First time using Conan to release software

Introduction

This week, I worked on my Static-Site Generator -Potato Generator to add package registry. My SSG is in C++ language. I chose Conan, GitLab, to publish my package officially.

Installation Process

  • Firstly, I have to ensure that I haveCMake andConan installed on my machine.
  • Secondly, I have to make sure that I createGitLab account, link it to my GitHub's project, createpersonal access token to access later.

Set-up Process

  • I build a package with name and version.
conan new potato-generator/1.0.0 -t
Enter fullscreen modeExit fullscreen mode
  • I build package with user and channel.
conan create . potato-generator/beta
Enter fullscreen modeExit fullscreen mode
  • I add remote to my project (get project_id from GitLab)
conan remote add gitlab https://gitlab.com/api/v4/projects/<project_id>/packages/conan
Enter fullscreen modeExit fullscreen mode
  • I add remote for my instance.
conan remote add gitlab https://gitlab.com/api/v4/packages/conan
Enter fullscreen modeExit fullscreen mode
  • I need to authenticate with my GitLab account. I use username andpersonal access token from installation step.
conan user <gitlab_username or deploy_token_username> -r gitlab -p <personal_access_token or deploy_token>
Enter fullscreen modeExit fullscreen mode
  • I publish the package.
conan upload potato-generator/1.0.0@potato-generator/beta --all
Enter fullscreen modeExit fullscreen mode
  • Finally, I create a git tag for my first version 1.0.0.
git tag -a v1.0.0 -m "Version 1.0.0"
Enter fullscreen modeExit fullscreen mode

Install my package instructions

To install my package from Conan, please carefully follow this instructions:

  • InstallConan andCMake
  • Install package by Conan command
conan install potato-generator --remote=gitlab
Enter fullscreen modeExit fullscreen mode
  • Add remote
conan remote add gitlab https://gitlab.com/api/v4/projects/31616511/packages/conan
Enter fullscreen modeExit fullscreen mode

Otherwise, please take a look at myRelease

Top comments(0)

Subscribe
pic
Create template

Templates let you quickly answer FAQs or store snippets for re-use.

Dismiss

Are you sure you want to hide this comment? It will become hidden in your post, but will still be visible via the comment'spermalink.

For further actions, you may consider blocking this person and/orreporting abuse

Senior Programming Student at Seneca College
  • Location
    Toronto, ON, Canada
  • Education
    Seneca College
  • Joined

More fromKien Nguyen Chi

DEV Community

We're a place where coders share, stay up-to-date and grow their careers.

Log in Create account

[8]ページ先頭

©2009-2025 Movatter.jp