Added make release option.
This commit is contained in:
parent
825f751bc2
commit
021f616aef
3
configure
vendored
3
configure
vendored
@ -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
|
||||||
|
|||||||
@ -27,3 +27,7 @@ cargo_release = custom_target('cargo-build',
|
|||||||
install_dir: hammond_bindir,
|
install_dir: hammond_bindir,
|
||||||
command: [cargo_script, '@CURRENT_SOURCE_DIR@', '@OUTPUT@'])
|
command: [cargo_script, '@CURRENT_SOURCE_DIR@', '@OUTPUT@'])
|
||||||
|
|
||||||
|
run_target('release', command: ['scripts/release.sh',
|
||||||
|
meson.project_name() + '-' + hammond_version
|
||||||
|
],
|
||||||
|
depends: [cargo_release])
|
||||||
|
|||||||
0
scripts/cargo.sh
Normal file → Executable file
0
scripts/cargo.sh
Normal file → Executable file
41
scripts/release.sh
Executable file
41
scripts/release.sh
Executable file
@ -0,0 +1,41 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
VERSION=$1
|
||||||
|
DEST=${MESON_BUILD_ROOT}
|
||||||
|
DIST=$DEST/dist/$VERSION
|
||||||
|
|
||||||
|
|
||||||
|
cd "${MESON_SOURCE_ROOT}"
|
||||||
|
mkdir -p $DIST
|
||||||
|
|
||||||
|
# copying files
|
||||||
|
cp -rf hammond-data $DIST
|
||||||
|
cp -rf hammond-gtk $DIST
|
||||||
|
cp -rf hammond-downloader $DIST
|
||||||
|
cp build.rs $DIST
|
||||||
|
cp Cargo.toml $DIST
|
||||||
|
cp configure $DIST
|
||||||
|
cp meson.build $DIST
|
||||||
|
cp Hammond.doap $DIST
|
||||||
|
cp LICENSE $DIST
|
||||||
|
cp README.md $DIST
|
||||||
|
# cp -rf assets/org.gnome.Hammond.desktop $DIST
|
||||||
|
cp -rf assets $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
|
||||||
|
|
||||||
Loading…
Reference in New Issue
Block a user