Merge pull request #31 from Orange-OpenSource/feature/create-deb-file

Create deb file explicitly with dpkg --build
This commit is contained in:
Fabrice Reix 2020-10-03 16:40:37 +02:00 committed by GitHub
commit abb2177a36
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
6 changed files with 60 additions and 12 deletions

View File

@ -21,6 +21,7 @@ jobs:
dist: bionic
before_script:
- export VERSION=$(grep '^version' Cargo.toml | cut -f2 -d'"')
- sudo apt install libcurl4-openssl-dev
script:
- ci/man.sh
- ci/release.sh

16
CHANGELOG.md Normal file
View File

@ -0,0 +1,16 @@
TBD
===
Unreleased changes
Using libcurl under the hood instead of reqwest rust crate.
This makes hurl even closer to curl in terms of behavior and semantic.
Bug fixes:
0.99.12 (2020-08-27)
=====================================
Initial Release (beta)

View File

@ -35,12 +35,6 @@ curl = "0.4.33"
#[dev-dependencies]
proptest = "0.9.4"
[package.metadata.deb]
assets = [
["target/release/hurl", "usr/bin/", "755"],
["target/release/hurlfmt", "usr/bin/", "755"],
["target/man/hurl.1.gz", "usr/share/man/man1/hurl.1.gz", "644"],
["target/man/hurlfmt.1.gz", "usr/share/man/man1/hurlfmt.1.gz", "644"]
]

View File

View File

@ -1,6 +1,43 @@
#!/bin/bash
set -e
cargo install cargo-deb
cargo deb
cp target/debian/*.deb target/upload
set -u
sudo rm -rf target/debian
mkdir target/debian
mkdir -p target/debian/usr/bin target/debian/DEBIAN
mkdir -p target/debian/usr/share/man/man1
mkdir -p target/debian/usr/share/doc/hurl
cp target/release/{hurl,hurlfmt} target/debian/usr/bin
cp target/man/{hurl.1.gz,hurlfmt.1.gz} target/debian/usr/share/man/man1
gzip -9 -n --stdout CHANGELOG.md > target/debian/usr/share/doc/hurl/changelog.gz
cat >target/debian/usr/share/doc/hurl/copyright <<END
Files: *
Copyright: 2020, Orange
License: http://www.apache.org/licenses/LICENSE-2.0
END
sudo chown -R root:root target/debian/usr
cat <<END >target/debian/DEBIAN/control
Package: hurl
Version: $VERSION
Section: web
Architecture: amd64
Priority: optional
Standards-Version: 3.9.4
Maintainer: Fabrice Reix <fabrice.reix@orange.com>
Depends: libc6 (>= 2.17), libcurl4, zlib1g, libxml2
Description: Run and test HTTP requests
Hurl is an HTTP client that performs HTTP requests defined in a simple plain
text format.
Hurl is very versatile, it enables to chain HTTP requests, capture values
from HTTP responses and make asserts.
END
dpkg --build target/debian
#sudo apt install lintian
#lintian target/debian.deb
mkdir -p target/upload
cp target/debian.deb "target/upload/hurl_${VERSION}_amd64.deb"

View File

@ -5,7 +5,7 @@ rm -rf target/man
mkdir -p target/man
cp docs/hurl.1 target/man
cp docs/hurlfmt.1 target/man
gzip target/man/hurl.1
gzip target/man/hurlfmt.1
gzip -n -9 target/man/hurl.1
gzip -n -9 target/man/hurlfmt.1