[tasks.confirm] description = "Confirm if the version was updated" script = [ "echo \"Brother, Did you update the version? [y/n]\"", "read yes_or_no", "if [ $yes_or_no == \"y\" ]; then echo \"Ok :)\"; else echo \"Update it bitch!\"; exit 1; fi", ] [tasks.myclean] description = "Clean previous build files" script = [ "cargo clean", "rm -rf windows", "rm -rf packages", ] [tasks.linux_build] description = "Build for linux" script = [ "cargo build --release", "strip -s target/release/ytdlp-gui", ] [tasks.rpm_build] description = "Build RPM" install_crate = "cargo-generate-rpm" dependencies = ["linux_build"] command = "cargo" args = ["generate-rpm"] [tasks.deb_build] description = "Build DEB" install_crate = "cargo-deb" command = "cargo" args = ["deb"] [tasks.aur_build] description = "Build tarbell and PKGBUILD" install_crate = "cargo-aur" dependencies = ["linux_build"] command = "cargo" args = ["aur"] [tasks.windows_build] description = "Build for windows" command = "cargo" args = ["build", "--release", "--target", "x86_64-pc-windows-gnu"] [tasks.package_linux] description = "Add the linux binary to the packages directory" dependencies = ["linux_build"] script = [ "mkdir -p packages", "mv -f -v target/release/ytdlp-gui packages/ytdlp-gui-linux-x64-86" ] [tasks.package_deb] description = "Add the deb package to the packages directory" dependencies = ["deb_build"] script = [ "mkdir -p packages", "mv -f -v target/debian/*.deb packages/" ] [tasks.package_rpm] description = "Add the rpm package to the packages directory" dependencies = ["rpm_build"] script = [ "mkdir -p packages", "mv -f -v target/generate-rpm/*.rpm packages/" ] [tasks.package_aur] description = "Add the rpm package to the packages directory" dependencies = ["aur_build"] script = [ "mkdir -p packages", "mv -f -v PKGBUILD packages/", "mv -f -v *.tar.gz packages/" ] [tasks.package_windows] description = "Package ffmpeg and yt-dlp and compress it with the app binary for windows" dependencies = ["windows_build"] script = [ "mkdir -p windows", "mkdir -p packages", "wget --directory-prefix windows https://github.com/BtbN/FFmpeg-Builds/releases/download/latest/ffmpeg-master-latest-win64-gpl.zip", "unzip windows/ffmpeg-master-latest-win64-gpl.zip -d windows/", "mv -f -v windows/ffmpeg-master-latest-win64-gpl/bin/ffmpeg.exe windows/", "rm -rf windows/ffmpeg-master-latest-win64-gpl", "rm -f windows/ffmpeg-master-latest-win64-gpl.zip", "wget --directory-prefix windows https://github.com/yt-dlp/yt-dlp/releases/latest/download/yt-dlp.exe", "mv -f -v target/x86_64-pc-windows-gnu/release/ytdlp-gui.exe windows", "tar -cvzf packages/ytdlp-gui-windows-64.tar.gz windows/*" ] [tasks.packages] dependencies = ["confirm", "myclean", "package_rpm", "package_deb", "package_aur", "package_linux", "package_windows"]