ian 0.6.1 → 0.7.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (5) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +14 -0
  3. data/bin/ian +26 -0
  4. data/lib/ian/version.rb +1 -1
  5. metadata +2 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: f961232150eac13599ae59a431b041128bf6a867
4
- data.tar.gz: 307feebe21ba1888d0e12bcd61170354fb4bed78
3
+ metadata.gz: 4b69ecf548a7ccaab86bb4dc1b3b7486354720e3
4
+ data.tar.gz: 321ba8f0d897d49f42a5da57d92a45ac069e5c43
5
5
  SHA512:
6
- metadata.gz: 6bd3072717c1d4ad63bd34c5accb9f764eca7b896fd3e900e0f986f0c818b082b6778e798245e3e091af847c10f85514c24fc7030ad6fcf4a814a5610a6df153
7
- data.tar.gz: c95a8413a01a96223e9c633927da5e17af9fbe9d64941237873bf6ebb6873c2bb921531a27f32ef7bc691552c1919596a4c3f46669aca2d0f0c7778fe931e1df
6
+ metadata.gz: 0c44e93349a686f214409c24f40954beef182bb2a62a9e1e38e1ef2c5270c3d950157d5e014a2858bd69dcb73c627b064b16758ea6f18ac7eeb37d13cbad88c5
7
+ data.tar.gz: cbb7bce51a04e258f4230f877306852ef14f1d277b318a63241f5be46da7332f1dee3290dda7a2705758ca03968324d170599a87bbe366029033cea310f2f046
data/README.md CHANGED
@@ -77,9 +77,23 @@ This prints the dependencies from the control file each on a separate line:
77
77
  Using this you can programatically set the version or architecture in the control
78
78
  file.
79
79
 
80
+ **Run a build script**
81
+
82
+ Put an executable script at `DEBIAN/build` and when you run:
83
+
84
+ $ ian build
85
+
86
+ Ian will run the script passing with the following args:
87
+
88
+ $ DEBAIN/build <dir> <version> <arch>
89
+
90
+ That is, the path to the package directory and the version and arch from the
91
+ control file.
92
+
80
93
  **Build a package**:
81
94
 
82
95
  $ ian pkg
96
+ $ ian pkg -b # runs the build script first
83
97
 
84
98
  Before building a package ian will determine the installed size and save it to
85
99
  the control file. Then the contents are rsynced to a temp dir, excluding the `.git`
data/bin/ian CHANGED
@@ -53,12 +53,38 @@ Slop.parse help: true do
53
53
  end
54
54
  end
55
55
 
56
+ command :build do
57
+ description "Run the script at DEBIAN/build"
58
+
59
+ run do |opts, args|
60
+ c = Ian.control(IAN_DIR)
61
+ build_script = File.join(Ian.debpath(IAN_DIR), "build")
62
+ abort "no such script: #{build_script}" unless File.exist?(build_script)
63
+ abort "not executable: #{build_script}" unless File.executable?(build_script)
64
+
65
+ cmd = "#{build_script} \"#{IAN_DIR}\" \"#{c[:version]}\" \"#{c[:arch]}\" "
66
+ log.debug "Running build script: #{cmd}"
67
+
68
+ system cmd
69
+
70
+ if !$?.success?
71
+ log.fatal "Script exited with status #{$?.exitstatus}"
72
+ exit $?.exitstatus
73
+ end
74
+ end
75
+ end
76
+
56
77
  command :pkg do
57
78
  description "Build a Debian package"
58
79
 
80
+ on :b, :build, "Run the build script prior to packaging"
81
+
59
82
  run do |opts, args|
60
83
  check_initialized!
61
84
 
85
+ system "#{$0} build" if opts.build?
86
+ exit $?.exitstatus unless $?.success?
87
+
62
88
  pkg = Ian.build_package(IAN_DIR, log)
63
89
  log.info "Package built to #{pkg}"
64
90
  end
@@ -1,3 +1,3 @@
1
1
  module Ian
2
- VERSION = "0.6.1"
2
+ VERSION = "0.7.0"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ian
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.6.1
4
+ version: 0.7.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Robert McLeod
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-05-02 00:00:00.000000000 Z
11
+ date: 2017-06-07 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: slop