Skip to content

Commit

Permalink
add equivalent methods
Browse files Browse the repository at this point in the history
  • Loading branch information
amr-crabnebula authored Jan 15, 2024
1 parent 7ad2659 commit a6c51ab
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 4 deletions.
2 changes: 1 addition & 1 deletion bindings/packager/nodejs/schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -730,7 +730,7 @@
]
},
"priority": {
"description": "Change the priority of the Debian Package. By default, it is set to optional. Recognized Priorities as of now are : required, important, standard, optional, extra",
"description": "Change the priority of the Debian Package. By default, it is set to `optional`. Recognized Priorities as of now are : `required`, `important`, `standard`, `optional`, `extra`",
"type": [
"string",
"null"
Expand Down
2 changes: 1 addition & 1 deletion bindings/packager/nodejs/src-ts/config.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -412,7 +412,7 @@ export interface DebianConfig {
*/
section?: string | null;
/**
* Change the priority of the Debian Package. By default, it is set to optional. Recognized Priorities as of now are : required, important, standard, optional, extra
* Change the priority of the Debian Package. By default, it is set to `optional`. Recognized Priorities as of now are : `required`, `important`, `standard`, `optional`, extra
*/
priority?: string | null;
/**
Expand Down
17 changes: 15 additions & 2 deletions crates/packager/src/config/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -313,8 +313,8 @@ pub struct DebianConfig {
pub desktop_template: Option<PathBuf>,
/// Define the section in Debian Control file. See : https://www.debian.org/doc/debian-policy/ch-archive.html#s-subsections
pub section: Option<String>,
/// Change the priority of the Debian Package. By default, it is set to optional.
/// Recognized Priorities as of now are : required, important, standard, optional, extra
/// Change the priority of the Debian Package. By default, it is set to `optional`.
/// Recognized Priorities as of now are : `required`, `important`, `standard`, `optional`, `extra`
pub priority: Option<String>,
/// List of custom files to add to the deb package.
/// Maps a dir/file to a dir/file inside the debian package.
Expand Down Expand Up @@ -363,6 +363,19 @@ impl DebianConfig {
self
}

/// Define the section in Debian Control file. See : https://www.debian.org/doc/debian-policy/ch-archive.html#s-subsections
pub fn section<S: Into<String>>(self, section: S) -> Self {
self.section.replace(section.into());
self
}

/// Change the priority of the Debian Package. By default, it is set to `optional`.
/// Recognized Priorities as of now are : `required`, `important`, `standard`, `optional`, `extra`
pub fn priority<S: Into<String>>(self, priority: S) -> Self {
self.priority.replace(priority.into());
self
}

/// Set the list of custom files to add to the deb package.
/// Maps a dir/file to a dir/file inside the debian package.
pub fn files<I, S, T>(mut self, files: I) -> Self
Expand Down

0 comments on commit a6c51ab

Please sign in to comment.