Rust의 간단한 실행 파일을 Chocolatey에 게시하세요 🍫

7152 단어 backenddevopsrust
Windows에 소프트웨어를 설치하는 가장 편안한 방법은 철저합니다Chocolatey 🍫 그리고 이 가이드에서 그 방법을 배우게 될 것입니다! 🤩 최소한 간단한 실행 파일의 경우 🐣

그런 식으로 Rust 앱vidmerger을 성공적으로 게시했습니다! 🎞✨

🐣 초기화 중



먼저 Chocolatey용 cli-tool을 설치합니다.

Set-ExecutionPolicy Bypass -Scope Process -Force; [System.Net.ServicePointManager]::SecurityProtocol = [System.Net.ServicePointManager]::SecurityProtocol -bor 3072; iex ((New-Object System.Net.WebClient).DownloadString('https://chocolatey.org/install.ps1'))


그런 다음 choco new my-app를 실행하여 다음 콘텐츠가 포함된 my-app라는 폴더를 생성합니다.

my-app
├── ReadMe.md
├── _TODO.txt
├── my-app.nuspec
└── tools
    ├── LICENSE.txt
    ├── VERIFICATION.txt
    ├── chocolateybeforemodify.ps1
    ├── chocolateyinstall.ps1
    └── chocolateyuninstall.ps1


게시를 위한 최소 설정은 다음과 같습니다.

my-app
├── my-app.nuspec
└── tools
    ├── LICENSE.txt
    └── VERIFICATION.txt

*.ps1 파일은 기본적으로 beforemodify , installuninstall 에서 실행되는 셸 명령을 정의하기 위한 것입니다. 간단한 실행 파일을 게시하는 데에는 실제로 필요하지 않습니다.

Rust 또는 무엇이든에서 *.exe 파일을 tools 폴더에 넣으세요 🦀

⚙️ 수정



내 Rust 앱vidmerger에서 수정된 세 개의 파일을 여기에서 보여 드리겠습니다. 그에 따라 수정하세요 👇

🎴 my-app.nuspec




<?xml version="1.0" encoding="utf-8"?>
<package xmlns="http://schemas.microsoft.com/packaging/2015/06/nuspec.xsd">
  <metadata>
    <id>vidmerger</id>
    <version>0.1.2</version>
    <title>vidmerger</title>
    <authors>Thomas Gotwig</authors>
    <projectUrl>https://github.com/tgotwig/vidmerger</projectUrl>
    <tags>video cli</tags>
    <summary>A wrapper around ffmpeg which simplifies merging multiple videos 🎞</summary>
    <description>Vidmerger is a command-line-tool which uses `ffmpeg` to merge multiple video-files with the same file-extension together into one file called `output.FORMAT`. It includes a usage help which you can print out by `vidmerger --help` 😃</description>
  </metadata>
  <files>
    <file src="tools\**" target="tools" />
  </files>
</package>


🎴 라이선스.txt




Copyright 2020 Thomas Gotwig

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.


🎴 VERIFICATION.txt




Generated by `CertUtil -hashfile vidmerger.exe SHA256`:

1268967539be0449126438887170c779aaea6fdbf4d835e529c77d4c56a7f75d


🧐를 푸시하기 전에 VERIFICATION.txt 내부의 해시를 업데이트하는 것을 고려하십시오.

🚀 밀고



무언가를 푸시하기 전에 먼저 choco-cli에 로그인해야 합니다. 그렇게 하려면 https://chocolatey.org/account로 이동하고 거기에서 로그인을 수행하고 Show API Key를 클릭하고 나열된 명령을 콘솔에서 실행하십시오.

마지막으로 Chocolatey에게 푸시합니다! 😃

cpack
Get-ChildItem *.nupkg | ren -NewName vidmerger.nupkg
choco push vidmerger.nupkg --source https://push.chocolatey.org
Remove-Item vidmerger.nupkg


그게 다야! 😊🍫

좋은 웹페이지 즐겨찾기