Package a Release

Linux lab Advanced 6 tasks 30 points

You're the release manager. Take the raw build folder, clean it up, and produce two deliverables: a compressed tarball for Linux users and a zip for everyone else, each with the version number in its name. Then verify them.

How it works: the terminal below is a real Linux machine running in your browser. Click it and type. Tasks tick themselves off as you complete them; questions are answered in the box under each task. Press Reset any time for a fresh machine. Your password on this machine (for sudo) is student.

student@vulntech:~ Starting…
Getting your Linux machine ready…
The first start downloads about 20 MB. After that your browser keeps it, and labs start in a moment.

Hints

Clean the build folder before you package it, or the junk ends up in both archives.

sha256sum file1 file2 > SHA256SUMS writes one line per file.

Solution explanation

First the folder is cleaned: build artefacts (.debug) and the version-control folder (.git) shouldn't ship. Then the same tree is packaged two ways: tar -czf for a Linux .tar.gz and zip -r for a cross-platform .zip, both named with the version from VERSION. sha256sum writes a checksum file so downloaders can verify the archives haven't been tampered with.

Show solution
cat build/VERSION
rm build/bin/app.debug
rm -r build/.git
tar -czvf dist/app-2.3.0.tar.gz build
zip -r dist/app-2.3.0.zip build
tar -tzf dist/app-2.3.0.tar.gz
unzip -l dist/app-2.3.0.zip
cd dist && sha256sum app-2.3.0.tar.gz app-2.3.0.zip > SHA256SUMS
cat SHA256SUMS
HOME LEARN COMMUNITY DASHBOARD