Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Snap created and published #1193

Closed
wants to merge 22 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 28 additions & 0 deletions .github/workflows/test-snap-can-build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: 🧪 Test snap can be built on x86_64

on:
push:
branches: [ main ]
pull_request:
branches: [ main ]

jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [16.x] # Are you are missing this specification?

steps:
- uses: actions/checkout@v2

- uses: snapcore/action-build@v1
id: build

- uses: diddlesnaps/snapcraft-review-action@v1
with:
snap: ${{ steps.build.outputs.snap }}
isClassic: 'false'
# Plugs and Slots declarations to override default denial (requires store assertion to publish)
# plugs: ./plug-declaration.json
# slots: ./slot-declaration.json
15 changes: 15 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,18 @@ target/
/tests/fixtures/commit-graphs/

**/generated-do-not-edit/

# gitginore template for creating Snap packages
# website: https://snapcraft.io/

parts/
prime/
stage/
*.snap

# Snapcraft global state tracking data(automatically generated)
# https://forum.snapcraft.io/t/location-to-save-global-state/768
/snap/.snapcraft/

# Source archive packed by `snapcraft cleanbuild` before pushing to the LXD container
/*_source.tar.bz2
11 changes: 11 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
[![Crates.io](https://img.shields.io/crates/v/gitoxide.svg)](https://crates.io/crates/gitoxide)
<img src="etc/msrv-badge.svg">

[![gitoxide](https://snapcraft.io/gitoxide/badge.svg)](https://snapcraft.io/gitoxide)

`gitoxide` is an implementation of `git` written in Rust for developing future-proof applications which strive for correctness and
performance while providing a pleasant and unsurprising developer experience.

Expand Down Expand Up @@ -177,6 +179,15 @@ For Arch Linux you can download `gitoxide` from `community` repository:
pacman -S gitoxide
```

### Install the snap:

For latest builds, based on most recent commits to `main` branch, use the `edge` channel.

```
sudo snap install gitoxide
```
To run it from your terminal, type: `gix` or `ein` to access either binary in the `gitoxide` suite

### From Source via Cargo

`cargo` is the Rust package manager which can easily be obtained through [rustup]. With it, you can build your own binary
Expand Down
Binary file added images/gix.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
67 changes: 67 additions & 0 deletions snap/snapcraft.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
name: gitoxide
adopt-info: gitoxide
summary: gitoxide is an implementation of git written in Rust
description: |
gitoxide is an implementation of git written in Rust for developing future-proof applications
which strive for correctness and performance while providing a pleasant and unsurprising
developer experience.
gitoxide provides the gix and ein binaries for use on the command-line to allow experimentation
with key features like fetch and clone, and to validate the usability and control of the API
offered by the gix crate.
gitoxide aspires to be a production-grade server implementation and the ein binary aspires to
become the default way to interact with git repositories.

To run it from your terminal, type: `gix` or `ein` to access binaries in the `gitoxide` suite

license: Apache-2.0

base: core20
grade: stable
confinement: strict
compression: lzo

apps:
gitoxide:
command: bin/gix
environment:
PATH: $SNAP/bin/:$PATH
plugs:
- network
- home

ein:
command: bin/ein
environment:
PATH: $SNAP/bin/:$PATH
plugs:
- network
- home

parts:
gitoxide:
source: https://github.com/Byron/gitoxide
source-type: git
plugin: rust
after: [cargo]

override-pull: |
snapcraftctl pull
snapcraftctl set-version "$(git describe --tags | sed 's/^v//' | cut -d "-" -f3)"

build-packages:
- cmake

cargo:
source: https://github.com/rust-lang/cargo
source-type: git
plugin: rust

override-pull: |
snapcraftctl pull
snapcraftctl set-version "$(git describe --tags | sed 's/^v//' | cut -d "-" -f2)"

build-packages:
- cargo
- rustc
- pkg-config
- librust-openssl-sys-dev
Loading