Using fakeroot debian folder must contain this files:
compat
rules
changelog
control
my-tool.install
my-tools.install
Map a file from your project directory to its destination path in the installed system.
For example, install the script into /usr/bin on the target filesystem.
Source: my-tools
Section: misc
Priority: optional
Maintainer: Your Name <youremail@example.com>
Standards-Version: 4.6.2
Package: my-tools
Architecture: all
Description: Minimal Debian package
A short description of the minimal Debian package.
{// See https://code.visualstudio.com/docs/editor/tasks for more information"version":"2.0.0","tasks":[{"label":"debian content","type":"shell","detail":"List the contents of the built debian package","command":"dpkg -c ${input:myVersions}","options":{"cwd":"${workspaceFolder}/debs"},"problemMatcher":[]},{"label":"debian control","type":"shell","detail":"view debian control","command":"dpkg -I ${input:myVersions}","options":{"cwd":"${workspaceFolder}/debs"},"problemMatcher":[]},{"label":"Build Debian Package","type":"shell","detail":"Build debian package","command":"fakeroot debian/rules binary","options":{"cwd":"${workspaceFolder}"},"group":{"kind":"build","isDefault":true},"problemMatcher":[]},{"label":"Clean","type":"shell","detail":"Clean fakeroot output","command":"fakeroot debian/rules clean","options":{"cwd":"${workspaceFolder}"},"problemMatcher":[]},{"label":"Update Changelog with dch","type":"shell","command":"dch --newversion ${input:changelogVersion} $(git log -1 --pretty=format:'* %s')","options":{"cwd":"${workspaceFolder}","env":{"DEBEMAIL":"dev@example.com","DEBFULLNAME":"dev com"}},"problemMatcher":[]}],"inputs":[{"id":"changelogVersion","type":"promptString","description":"Enter the new version for dch"},{"id":"myVersions","type":"pickString","description":"Pick a version","options":["my-tools_0.0.1_all.deb","my-tools_0.0.2_all.deb","Option C"]}]}
setting.json
Replace indentation from space to tab when using sheelscript
exclude file from ignore folder, for it to work we need to ignore files in folder and not the folder it self debian/*
dpkg
dpkg -c : List contents of a deb package.
dpkg -I : Show information about a package.
Debian scripts
Debian packages can include executable scripts that run automatically at different stages of installation, upgrade, and removal. These scripts live in the package’s debian/ directory.