2019-03-24 05:39:25 +03:00
|
|
|
#!/bin/bash
|
|
|
|
set -x
|
2019-06-23 16:47:35 +03:00
|
|
|
set -e
|
2019-03-24 05:39:25 +03:00
|
|
|
|
2020-01-20 02:38:24 +03:00
|
|
|
TARGET_DIR=${1:-target}
|
|
|
|
|
2019-03-24 23:55:08 +03:00
|
|
|
TAG_NAME=${TAG_NAME:-$(git describe --tags)}
|
|
|
|
TAG_NAME=${TAG_NAME:-$(date +'%Y%m%d-%H%M%S')-$(git log --format=%h -1)}
|
2019-03-24 05:39:25 +03:00
|
|
|
|
|
|
|
HERE=$(pwd)
|
|
|
|
|
|
|
|
case $OSTYPE in
|
|
|
|
darwin*)
|
2020-02-13 00:16:13 +03:00
|
|
|
zipdir=WezTerm-macos-$TAG_NAME
|
2019-06-27 16:58:21 +03:00
|
|
|
if [[ "$BUILD_REASON" == "Schedule" ]] ; then
|
|
|
|
zipname=WezTerm-macos-nightly.zip
|
|
|
|
else
|
|
|
|
zipname=$zipdir.zip
|
|
|
|
fi
|
|
|
|
rm -rf $zipdir $zipname
|
2019-03-24 23:55:08 +03:00
|
|
|
mkdir $zipdir
|
|
|
|
cp -r assets/macos/WezTerm.app $zipdir/
|
2020-01-20 02:38:24 +03:00
|
|
|
cp $TARGET_DIR/release/wezterm $zipdir/WezTerm.app
|
2020-10-03 10:10:04 +03:00
|
|
|
cp $TARGET_DIR/release/wezterm-mux-server $zipdir/WezTerm.app
|
2020-10-25 02:54:36 +03:00
|
|
|
cp $TARGET_DIR/release/wezterm-gui $zipdir/WezTerm.app
|
2020-05-18 07:51:07 +03:00
|
|
|
cp $TARGET_DIR/release/strip-ansi-escapes $zipdir/WezTerm.app
|
2019-06-27 16:58:21 +03:00
|
|
|
zip -r $zipname $zipdir
|
2020-06-07 22:48:41 +03:00
|
|
|
|
|
|
|
SHA256=$(shasum -a 256 $zipname | cut -d' ' -f1)
|
2020-06-08 21:09:16 +03:00
|
|
|
sed -e "s/@TAG@/$TAG_NAME/g" -e "s/@SHA256@/$SHA256/g" < ci/wezterm-homebrew-macos.rb.template > wezterm.rb
|
2020-06-07 22:48:41 +03:00
|
|
|
cat wezterm.rb
|
|
|
|
|
2019-03-24 05:39:25 +03:00
|
|
|
;;
|
2019-03-24 20:42:20 +03:00
|
|
|
msys)
|
2020-02-13 00:16:13 +03:00
|
|
|
zipdir=WezTerm-windows-$TAG_NAME
|
2019-06-27 16:58:21 +03:00
|
|
|
if [[ "$BUILD_REASON" == "Schedule" ]] ; then
|
|
|
|
zipname=WezTerm-windows-nightly.zip
|
2020-05-25 10:12:36 +03:00
|
|
|
instname=WezTerm-nightly-setup
|
2019-06-27 16:58:21 +03:00
|
|
|
else
|
|
|
|
zipname=$zipdir.zip
|
2020-05-25 10:12:36 +03:00
|
|
|
instname=WezTerm-${TAG_NAME}-setup
|
2019-06-27 16:58:21 +03:00
|
|
|
fi
|
|
|
|
rm -rf $zipdir $zipname
|
2019-03-24 23:55:08 +03:00
|
|
|
mkdir $zipdir
|
2020-04-06 22:39:35 +03:00
|
|
|
cp $TARGET_DIR/release/wezterm.exe \
|
2020-10-03 10:10:04 +03:00
|
|
|
$TARGET_DIR/release/wezterm-mux-server.exe \
|
2020-10-25 02:54:36 +03:00
|
|
|
$TARGET_DIR/release/wezterm-gui.exe \
|
2020-05-18 07:51:07 +03:00
|
|
|
$TARGET_DIR/release/strip-ansi-escapes.exe \
|
2020-04-06 22:39:35 +03:00
|
|
|
$TARGET_DIR/release/wezterm.pdb \
|
|
|
|
assets/windows/conhost/conpty.dll \
|
|
|
|
assets/windows/conhost/OpenConsole.exe \
|
|
|
|
$zipdir
|
2020-10-02 04:31:57 +03:00
|
|
|
mkdir $zipdir/mesa
|
|
|
|
cp $TARGET_DIR/release/mesa/opengl32.dll \
|
|
|
|
$zipdir/mesa
|
2019-06-27 16:58:21 +03:00
|
|
|
7z a -tzip $zipname $zipdir
|
2020-05-25 10:12:36 +03:00
|
|
|
iscc.exe -DMyAppVersion=${TAG_NAME#nightly} -F${instname} ci/windows-installer.iss
|
2019-03-25 03:49:28 +03:00
|
|
|
;;
|
|
|
|
linux-gnu)
|
2020-05-03 21:21:58 +03:00
|
|
|
distro=$(lsb_release -is)
|
|
|
|
distver=$(lsb_release -rs)
|
|
|
|
case "$distro" in
|
2020-02-11 06:22:38 +03:00
|
|
|
*Fedora*|*CentOS*)
|
2019-12-29 19:41:50 +03:00
|
|
|
WEZTERM_RPM_VERSION=$(echo ${TAG_NAME#nightly-} | tr - _)
|
|
|
|
cat > wezterm.spec <<EOF
|
|
|
|
Name: wezterm
|
|
|
|
Version: ${WEZTERM_RPM_VERSION}
|
|
|
|
Release: 1%{?dist}
|
|
|
|
Packager: Wez Furlong <wez@wezfurlong.org>
|
|
|
|
License: MIT
|
|
|
|
URL: https://wezfurlong.org/wezterm/
|
|
|
|
Summary: Wez's Terminal Emulator.
|
|
|
|
Requires: dbus, fontconfig, openssl, libxcb, libxkbcommon, libxkbcommon-x11, libwayland-client, libwayland-egl, libwayland-cursor, mesa-libEGL, xcb-util-keysyms, xcb-util-wm
|
|
|
|
|
|
|
|
%description
|
|
|
|
wezterm is a terminal emulator with support for modern features
|
|
|
|
such as fonts with ligatures, hyperlinks, tabs and multiple
|
|
|
|
windows.
|
|
|
|
|
|
|
|
%build
|
|
|
|
echo "Doing the build bit here"
|
|
|
|
|
|
|
|
%install
|
|
|
|
set -x
|
2020-02-11 09:16:34 +03:00
|
|
|
cd ${HERE}
|
2020-09-11 08:01:47 +03:00
|
|
|
mkdir -p %{buildroot}/usr/bin
|
2020-09-11 07:18:32 +03:00
|
|
|
install -Dsm755 target/release/wezterm -t %{buildroot}/usr/bin
|
2020-10-03 10:10:04 +03:00
|
|
|
install -Dsm755 target/release/wezterm-mux-server -t %{buildroot}/usr/bin
|
2020-10-25 03:17:45 +03:00
|
|
|
install -Dsm755 target/release/wezterm-gui -t %{buildroot}/usr/bin
|
2020-09-11 07:18:32 +03:00
|
|
|
install -Dsm755 target/release/strip-ansi-escapes -t %{buildroot}/usr/bin
|
2020-01-21 10:11:38 +03:00
|
|
|
install -Dm644 assets/icon/terminal.png %{buildroot}/usr/share/icons/hicolor/128x128/apps/org.wezfurlong.wezterm.png
|
|
|
|
install -Dm644 assets/wezterm.desktop %{buildroot}/usr/share/applications/org.wezfurlong.wezterm.desktop
|
2020-05-05 08:55:33 +03:00
|
|
|
install -Dm644 assets/wezterm.appdata.xml %{buildroot}/usr/share/metainfo/org.wezfurlong.wezterm.appdata.xml
|
2019-12-29 19:41:50 +03:00
|
|
|
|
|
|
|
%files
|
|
|
|
/usr/bin/wezterm
|
2020-10-25 02:54:36 +03:00
|
|
|
/usr/bin/wezterm-gui
|
2020-10-03 10:10:04 +03:00
|
|
|
/usr/bin/wezterm-mux-server
|
2020-05-18 07:51:07 +03:00
|
|
|
/usr/bin/strip-ansi-escapes
|
2020-01-21 10:11:38 +03:00
|
|
|
/usr/share/icons/hicolor/128x128/apps/org.wezfurlong.wezterm.png
|
|
|
|
/usr/share/applications/org.wezfurlong.wezterm.desktop
|
2020-05-05 08:55:33 +03:00
|
|
|
/usr/share/metainfo/org.wezfurlong.wezterm.appdata.xml
|
2019-12-29 19:41:50 +03:00
|
|
|
EOF
|
|
|
|
|
2020-02-11 09:16:34 +03:00
|
|
|
/usr/bin/rpmbuild -bb --rmspec wezterm.spec --verbose
|
2019-12-29 19:41:50 +03:00
|
|
|
|
|
|
|
;;
|
2019-03-25 03:49:28 +03:00
|
|
|
Ubuntu*|Debian*)
|
|
|
|
rm -rf pkg
|
2019-11-20 07:50:20 +03:00
|
|
|
mkdir -p pkg/debian/usr/bin pkg/debian/DEBIAN pkg/debian/usr/share/{applications,wezterm}
|
2019-03-25 03:49:28 +03:00
|
|
|
cat > pkg/debian/DEBIAN/control <<EOF
|
|
|
|
Package: wezterm
|
2019-06-27 02:04:31 +03:00
|
|
|
Version: ${TAG_NAME#nightly-}
|
2019-03-25 03:49:28 +03:00
|
|
|
Architecture: amd64
|
|
|
|
Maintainer: Wez Furlong <wez@wezfurlong.org>
|
|
|
|
Section: utils
|
|
|
|
Priority: optional
|
2019-12-29 19:41:50 +03:00
|
|
|
Homepage: https://wezfurlong.org/wezterm/
|
2019-03-25 03:49:28 +03:00
|
|
|
Description: Wez's Terminal Emulator.
|
|
|
|
wezterm is a terminal emulator with support for modern features
|
|
|
|
such as fonts with ligatures, hyperlinks, tabs and multiple
|
|
|
|
windows.
|
|
|
|
Depends: libc6, libegl-mesa0, libxcb-icccm4, libxcb-ewmh2, libxcb-keysyms1, libxcb-xkb1, libxkbcommon0, libxkbcommon-x11-0, libfontconfig1, xdg-utils, libxcb-render0, libxcb-shape0, libx11-6, libegl1
|
|
|
|
EOF
|
2020-10-03 10:10:04 +03:00
|
|
|
install -Dsm755 -t pkg/debian/usr/bin target/release/wezterm-mux-server
|
2020-10-25 02:54:36 +03:00
|
|
|
install -Dsm755 -t pkg/debian/usr/bin target/release/wezterm-gui
|
2020-01-21 10:11:38 +03:00
|
|
|
install -Dsm755 -t pkg/debian/usr/bin target/release/wezterm
|
2020-05-18 07:51:07 +03:00
|
|
|
install -Dsm755 -t pkg/debian/usr/bin target/release/strip-ansi-escapes
|
2020-01-21 10:11:38 +03:00
|
|
|
install -Dm644 assets/icon/terminal.png pkg/debian/usr/share/icons/hicolor/128x128/apps/org.wezfurlong.wezterm.png
|
|
|
|
install -Dm644 assets/wezterm.desktop pkg/debian/usr/share/applications/org.wezfurlong.wezterm.desktop
|
2020-05-05 08:55:33 +03:00
|
|
|
install -Dm644 assets/wezterm.appdata.xml pkg/debian/usr/share/metainfo/org.wezfurlong.wezterm.appdata.xml
|
2019-06-27 16:58:21 +03:00
|
|
|
if [[ "$BUILD_REASON" == "Schedule" ]] ; then
|
2020-05-03 21:21:58 +03:00
|
|
|
debname=wezterm-nightly.$distro$distver
|
2019-06-27 16:58:21 +03:00
|
|
|
else
|
2020-05-03 21:21:58 +03:00
|
|
|
debname=wezterm-$TAG_NAME.$distro$distver
|
2019-06-27 16:58:21 +03:00
|
|
|
fi
|
|
|
|
fakeroot dpkg-deb --build pkg/debian $debname.deb
|
2019-10-14 10:40:20 +03:00
|
|
|
tar cJf $debname.tar.xz -C pkg/debian/usr/bin wezterm
|
2019-03-25 03:49:28 +03:00
|
|
|
rm -rf pkg
|
|
|
|
;;
|
|
|
|
esac
|
2019-03-24 20:42:20 +03:00
|
|
|
;;
|
2019-03-24 05:39:25 +03:00
|
|
|
*)
|
|
|
|
;;
|
|
|
|
esac
|