Commit d0dac5e7 authored by Daniel García Moreno's avatar Daniel García Moreno

meson release build target that generates tar.gz with vendor

parent 9c32b24b
...@@ -5,3 +5,4 @@ target ...@@ -5,3 +5,4 @@ target
Makefile Makefile
_build _build
Cargo.lock Cargo.lock
vendor
...@@ -141,6 +141,9 @@ install: ...@@ -141,6 +141,9 @@ install:
uninstall: uninstall:
${NINJA} ${NINJA_OPT} uninstall ${NINJA} ${NINJA_OPT} uninstall
release:
${NINJA} ${NINJA_OPT} release
check: check:
${MESONTEST} ${NINJA_OPT} ${MESONTEST} ${NINJA_OPT}
END END
......
...@@ -29,3 +29,8 @@ cargo_release = custom_target('cargo-build', ...@@ -29,3 +29,8 @@ cargo_release = custom_target('cargo-build',
install: true, install: true,
install_dir: fractal_bindir, install_dir: fractal_bindir,
command: ['FRACTAL_RES=' + fractal_datadir, cargo_script, '@CURRENT_SOURCE_DIR@', '@OUTPUT@']) command: ['FRACTAL_RES=' + fractal_datadir, cargo_script, '@CURRENT_SOURCE_DIR@', '@OUTPUT@'])
run_target('release', command: ['scripts/release.sh',
meson.project_name() + '-' + fractal_version
],
depends: [cargo_release])
#!/bin/sh
VERSION=$1
DEST=${MESON_BUILD_ROOT}
DIST=$DEST/dist/$VERSION
cd "${MESON_SOURCE_ROOT}"
mkdir -p $DIST
# copying files
cp -rf src $DIST
cp build.rs $DIST
cp Cargo.toml $DIST
cp configure $DIST
cp meson.build $DIST
cp fractal.doap $DIST
cp LICENSE.txt $DIST
cp README.md $DIST
cp -rf res $DIST
cp -rf scripts $DIST
# cargo vendor
cargo vendor
mkdir $DIST/.cargo
cat <<EOF > $DIST/.cargo/config
[source.crates-io]
replace-with = "vendored-sources"
[source.vendored-sources]
directory = "vendor"
EOF
cp -rf vendor $DIST/
# packaging
cd $DEST/dist
tar -czvf $VERSION.tar.gz $VERSION
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment