Skip to content

Commit

Permalink
#42 set props in pom
Browse files Browse the repository at this point in the history
  • Loading branch information
yegor256 committed Jan 16, 2024
1 parent a6b42b1 commit f98b62e
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 5 deletions.
4 changes: 2 additions & 2 deletions Rakefile
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ Rake::RDocTask.new do |rdoc|
end

require 'rubocop/rake_task'
desc 'Run RuboCop on all directories'
desc 'Run Rubocop on all directories'
RuboCop::RakeTask.new(:rubocop) do |task|
task.fail_on_error = true
task.requires << 'rubocop-rspec'
Expand All @@ -69,7 +69,7 @@ Xcop::RakeTask.new :xcop do |task|
end

task :copyright do
sh "grep -q -r '#{Date.today.strftime('%Y')}' \
sh "grep -q -r '2019-#{Date.today.strftime('%Y')}' \
--include '*.rb' \
--include '*.txt' \
--include 'Rakefile' \
Expand Down
5 changes: 5 additions & 0 deletions lib/pgtk/liquibase_task.rb
Original file line number Diff line number Diff line change
Expand Up @@ -69,10 +69,15 @@ def run
'mvn verify',
'--errors',
'--batch-mode',
'--fail-fast',
@quiet ? '--quiet' : '',
'--file',
Shellwords.escape(pom),
'--define',
'liquibase.version=3.2.2',
'--define',
'postgresql.version=42.7.0',
'--define',
"liquibase.changeLogFile=#{@master}",
'--define',
"liquibase.url=#{Shellwords.escape(yml['pgsql']['url'])}",
Expand Down
10 changes: 7 additions & 3 deletions resources/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -26,13 +26,17 @@ SOFTWARE.
<modelVersion>4.0.0</modelVersion>
<groupId>pgtk</groupId>
<artifactId>pgtk</artifactId>
<version>1.0-SNAPSHOT</version>
<version>0.0.0</version>
<packaging>pom</packaging>
<properties>
<postgresql.version>42.7.0</postgresql.version>
<liquibase.version>3.2.2</liquibase.version>
</properties>
<dependencies>
<dependency>
<groupId>org.postgresql</groupId>
<artifactId>postgresql</artifactId>
<version>42.7.0</version>
<version>${postgresql.version}</version>
<scope>runtime</scope>
</dependency>
</dependencies>
Expand All @@ -41,7 +45,7 @@ SOFTWARE.
<plugin>
<groupId>org.liquibase</groupId>
<artifactId>liquibase-maven-plugin</artifactId>
<version>3.2.2</version>
<version>${liquibase.version}</version>
<configuration>
<driver>org.postgresql.Driver</driver>
<logging>info</logging>
Expand Down

0 comments on commit f98b62e

Please sign in to comment.