mirror of
https://github.com/chromebrew/chromebrew.git
synced 2026-01-09 15:37:56 -05:00
Add preflight function (#5347)
* Add preflight function * Add self.preflight section to Manual.md
This commit is contained in:
@@ -108,6 +108,9 @@ class Template < Package # Notice the capitals, EG: 'I3' - would be used for an
|
||||
depends_on '#' => :build # Only required when the package
|
||||
is built from source
|
||||
# Notice the newline
|
||||
def self.preflight # For preflight checks, not required
|
||||
system '#' # Replace '#' with a disk space check, for example
|
||||
end
|
||||
def self.prebuild # For sed operations, not required
|
||||
system '#' # Replace '#' with a sed operation
|
||||
end
|
||||
|
||||
1
crew
1
crew
@@ -740,6 +740,7 @@ def expand_dependencies
|
||||
end
|
||||
|
||||
def resolve_dependencies
|
||||
@pkg.preflight
|
||||
expand_dependencies
|
||||
|
||||
# leave only not installed packages in dependencies
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
# Defines common constants used in different parts of crew
|
||||
|
||||
CREW_VERSION = '1.7.10'
|
||||
CREW_VERSION = '1.7.11'
|
||||
|
||||
ARCH_ACTUAL = `uname -m`.strip
|
||||
# This helps with virtualized builds on aarch64 machines
|
||||
|
||||
@@ -69,6 +69,11 @@ class Package
|
||||
@is_fake
|
||||
end
|
||||
|
||||
# Function to perform pre-flight operations prior to dependency checks.
|
||||
def self.preflight
|
||||
|
||||
end
|
||||
|
||||
# Function to perform patch operations prior to build from source.
|
||||
def self.patch
|
||||
|
||||
|
||||
@@ -30,6 +30,11 @@ class Template < Package
|
||||
# depends_on '*'
|
||||
#
|
||||
|
||||
# Function to perform pre-flight operations prior to dependency checks.
|
||||
def self.preflight
|
||||
|
||||
end
|
||||
|
||||
|
||||
# Function to perform patch operations prior to build from source.
|
||||
def self.patch
|
||||
|
||||
Reference in New Issue
Block a user