Enable and fix snap package release job, mention snap package in README
This commit is contained in:
parent
d0a301b300
commit
7e5cfe9e3b
3 changed files with 37 additions and 21 deletions
|
@ -155,6 +155,35 @@ crate:
|
|||
- echo "Publishing crate to crates.io..."
|
||||
- cargo publish --verbose --allow-dirty
|
||||
|
||||
# Snap release
|
||||
snap:
|
||||
image: snapcore/snapcraft:edge
|
||||
stage: release
|
||||
only:
|
||||
- /^v(\d+\.)*\d+$/
|
||||
before_script: []
|
||||
script:
|
||||
# Prepare the environment
|
||||
- apt-get update -y
|
||||
- cd pkg/snap
|
||||
|
||||
# Update version number in snapcraft.yml
|
||||
- VERSION=$(echo $CI_COMMIT_REF_NAME | cut -c 2-)
|
||||
- echo "Determined binary version number 'v$VERSION', updating snapcraft.yml..."
|
||||
- sed "s/^version:.*\$/version: $VERSION/" -i snapcraft.yml
|
||||
- sed "s/^pkgver=.*\$/pkgver=$VERSION/" -i snapcraft.yml
|
||||
|
||||
# Build the package
|
||||
- echo "Building snap package..."
|
||||
- snapcraft
|
||||
|
||||
# TODO: test snap package
|
||||
|
||||
# Publish snap package
|
||||
- echo "Publishing snap package..."
|
||||
- echo "$SNAP_MAIL\n&SNAP_PASSWORD" | snapcraft login
|
||||
- snapcraft push --release=stable ffsend_*_amd64.snap
|
||||
|
||||
# Publish release binaries to as GitHub release
|
||||
github-release:
|
||||
stage: release
|
||||
|
@ -255,23 +284,4 @@ package-aur:
|
|||
# - export VERSION=$(echo $CI_COMMIT_REF_NAME | cut -c 2-)
|
||||
# - 'curl -L -H "Content-Type: application/json" -H "Authorization: Bearer $APPVEYOR_TOKEN" -d "{\"accountName\":\"timvisee\",\"projectSlug\":\"ffsend\",\"tag\":\"$CI_COMMIT_REF_NAME\",\"environmentVariables\":{\"FFSEND_VERSION\":\"$VERSION\"}}" https://ci.appveyor.com/api/builds'
|
||||
|
||||
# # Snap release
|
||||
# snap:
|
||||
# image: snapcore/snapcraft:edge
|
||||
# stage: release
|
||||
# # only:
|
||||
# # - /^v(\d+\.)*\d+$/
|
||||
# before_script: []
|
||||
# script:
|
||||
# - echo "Building snap package..."
|
||||
# - cd pkg/snap
|
||||
# - snapcraft
|
||||
# # TODO: See: https://docs.snapcraft.io/rust-applications/7826
|
||||
# # TODO: - login to registry
|
||||
# # TODO: - test built snap
|
||||
# # TODO: - push snap to snapcraft.io
|
||||
# # - echo "Publishing snap package..."
|
||||
# # - echo "$SNAP_USER\n&SNAP_PASS" | snapcraft login
|
||||
# # - snapcraft push --release=edge ffsend_amd64.snap
|
||||
|
||||
# TODO: add job to test ffsend{-git} AUR packages
|
||||
|
|
|
@ -152,6 +152,12 @@ available right now.
|
|||
It is recommended to build and install `ffsend` yourself using these fairly
|
||||
easy steps [below](#build).
|
||||
|
||||
#### Snap package
|
||||
[» `ffsend`][snapcraft-ffsend]
|
||||
```bash
|
||||
snap install ffsend
|
||||
```
|
||||
|
||||
#### Arch AUR package
|
||||
[» `ffsend`][aur-ffsend] (binary package)
|
||||
[» `ffsend-git`][aur-ffsend-git] (compile from source package)
|
||||
|
@ -433,3 +439,4 @@ Check out the [LICENSE](LICENSE) file for more information.
|
|||
[github-latest-release]: https://github.com/timvisee/ffsend/releases/latest
|
||||
[aur-ffsend]: https://aur.archlinux.org/packages/ffsend/
|
||||
[aur-ffsend-git]: https://aur.archlinux.org/packages/ffsend-git/
|
||||
[snapcraft-ffsend]: https://snapcraft.io/ffsend
|
||||
|
|
|
@ -27,6 +27,5 @@ parts:
|
|||
source: ../../
|
||||
plugin: rust
|
||||
build-attributes: [no-system-libraries]
|
||||
build-packages: [make, cmake, pkg-config]
|
||||
# build-packages: [g++, libudev-dev, libssl-dev, make, pkg-config]
|
||||
build-packages: [make, cmake, pkg-config, libssl-dev]
|
||||
stage-packages: [libssl1.0.0, xclip]
|
||||
|
|
Loading…
Reference in a new issue