Skip to content

Commit 98cbbb2

Browse files
committed
Make versions match SemVer pattern
All PE version downloads need to match the x.y.z format. This commit changes the type specifier to require this format. This is especially useful to help guide people to the right parameters if they specify a version like "2022.4" instead of "2022.4.0".
1 parent 130948d commit 98cbbb2

File tree

4 files changed

+7
-6
lines changed

4 files changed

+7
-6
lines changed

Diff for: plans/install.pp

+1-1
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626

2727
# Common Configuration
2828
String $console_password,
29-
String $version = '2019.8.8',
29+
Peadm::Pe_version $version = '2019.8.8',
3030
Optional[Array[String]] $dns_alt_names = undef,
3131
Optional[String] $compiler_pool_address = undef,
3232
Optional[String] $internal_compiler_a_pool_address = undef,

Diff for: plans/subplans/install.pp

+1-1
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@
3434

3535
# Common Configuration
3636
String $console_password,
37-
String $version = '2019.8.5',
37+
Peadm::Pe_version $version,
3838
Array[String] $dns_alt_names = [ ],
3939
Hash $pe_conf_data = { },
4040

Diff for: plans/upgrade.pp

+4-4
Original file line numberDiff line numberDiff line change
@@ -25,10 +25,10 @@
2525
Optional[Peadm::SingleTargetSpec] $replica_postgresql_host = undef,
2626

2727
# Common Configuration
28-
String $version,
29-
Optional[String] $compiler_pool_address = undef,
30-
Optional[String] $internal_compiler_a_pool_address = undef,
31-
Optional[String] $internal_compiler_b_pool_address = undef,
28+
Peadm::Pe_version $version,
29+
Optional[String] $compiler_pool_address = undef,
30+
Optional[String] $internal_compiler_a_pool_address = undef,
31+
Optional[String] $internal_compiler_b_pool_address = undef,
3232

3333
# Other
3434
Optional[String] $token_file = undef,

Diff for: types/pe_version.pp

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
type Peadm::Pe_version = Pattern[/^\d+\.\d+\.\d+(-.+)?$/]

0 commit comments

Comments
 (0)