2024-03-18 20:24:08 -07:00
|
|
|
#!/bin/sh
|
|
|
|
|
2024-04-16 20:00:48 -07:00
|
|
|
version=`cat ../VERSION`
|
2024-04-16 02:29:36 -07:00
|
|
|
|
|
|
|
# Cleanup
|
2024-07-03 21:55:52 -07:00
|
|
|
rm -rf SourceGit *.tar.gz resources/deb/opt *.deb *.rpm *.AppImage
|
2024-04-16 02:29:36 -07:00
|
|
|
|
2024-07-03 21:55:52 -07:00
|
|
|
# Generic AppImage
|
|
|
|
cd resources/appimage
|
|
|
|
./publish-appimage -y -o sourcegit-${version}.linux.x86_64.AppImage
|
2024-04-16 02:29:36 -07:00
|
|
|
|
2024-07-03 21:55:52 -07:00
|
|
|
# Move to build dir
|
|
|
|
mv AppImages/sourcegit-${version}.linux.x86_64.AppImage ../../
|
|
|
|
mv AppImages/AppDir/usr/bin ../../SourceGit
|
|
|
|
cd ../../
|
2024-04-16 02:29:36 -07:00
|
|
|
|
|
|
|
# Debain/Ubuntu package
|
|
|
|
mkdir -p resources/deb/opt/sourcegit/
|
2024-08-02 13:49:08 -07:00
|
|
|
mkdir -p resources/deb/usr/bin
|
2024-04-16 02:29:36 -07:00
|
|
|
mkdir -p resources/deb/usr/share/applications
|
|
|
|
mkdir -p resources/deb/usr/share/icons
|
|
|
|
cp -f SourceGit/* resources/deb/opt/sourcegit/
|
2024-08-02 13:49:08 -07:00
|
|
|
ln -sf ../../opt/sourcegit/sourcegit resources/deb/usr/bin
|
2024-06-27 20:21:58 -07:00
|
|
|
cp -r resources/_common/applications resources/deb/usr/share/
|
|
|
|
cp -r resources/_common/icons resources/deb/usr/share/
|
2024-04-16 02:29:36 -07:00
|
|
|
sed -i "2s/.*/Version: ${version}/g" resources/deb/DEBIAN/control
|
2024-08-02 23:43:17 -07:00
|
|
|
dpkg-deb --root-owner-group --build resources/deb ./sourcegit_${version}-1_amd64.deb
|
2024-04-16 02:29:36 -07:00
|
|
|
|
|
|
|
# Redhat/CentOS/Fedora package
|
|
|
|
rpmbuild -bb --target=x86_64 resources/rpm/SPECS/build.spec --define "_topdir `pwd`/resources/rpm" --define "_version ${version}"
|
|
|
|
mv resources/rpm/RPMS/x86_64/sourcegit-${version}-1.x86_64.rpm .
|
|
|
|
|
2024-04-16 20:00:48 -07:00
|
|
|
rm -rf SourceGit
|