diff options
| author | Hisham Muhammad <hisham@gobolinux.org> | 2018-10-30 17:55:09 -0300 |
|---|---|---|
| committer | Hisham Muhammad <hisham@gobolinux.org> | 2018-10-30 17:55:09 -0300 |
| commit | aafc594d96d306dc999b3bb39b98d1e686beef71 (patch) | |
| tree | 9cf96e6f0322cb27a8bcb982548141e0c5e7dad5 | |
| parent | 8707522ec7d09ef21b91142d1215e2a14b993944 (diff) | |
| download | luarocks-aafc594d96d306dc999b3bb39b98d1e686beef71.tar.gz luarocks-aafc594d96d306dc999b3bb39b98d1e686beef71.tar.bz2 luarocks-aafc594d96d306dc999b3bb39b98d1e686beef71.zip | |
makedist: add 'binary' and 'sign' steps
| -rwxr-xr-x | makedist | 44 |
1 files changed, 44 insertions, 0 deletions
| @@ -75,6 +75,8 @@ out="luarocks-$1" | |||
| 75 | rm -rf "$out" | 75 | rm -rf "$out" |
| 76 | mkdir "$out" | 76 | mkdir "$out" |
| 77 | 77 | ||
| 78 | shift | ||
| 79 | |||
| 78 | git ls-files | while read i | 80 | git ls-files | while read i |
| 79 | do | 81 | do |
| 80 | if [ -f "$i" ] | 82 | if [ -f "$i" ] |
| @@ -96,6 +98,7 @@ cd "release-unix/$out" | |||
| 96 | rm -rf makedist install.bat win32 .travis.yml .gitignore appveyor* .appveyor | 98 | rm -rf makedist install.bat win32 .travis.yml .gitignore appveyor* .appveyor |
| 97 | cd .. | 99 | cd .. |
| 98 | tar czvpf ../"$out.tar.gz" "$out" | 100 | tar czvpf ../"$out.tar.gz" "$out" |
| 101 | rm -f ../"$out.tar.gz.asc" | ||
| 99 | cd .. | 102 | cd .. |
| 100 | rm -rf "release-unix" | 103 | rm -rf "release-unix" |
| 101 | 104 | ||
| @@ -103,5 +106,46 @@ cd "release-windows/$out-win32" | |||
| 103 | rm -rf makedist Makefile GNUmakefile configure .travis.yml .gitignore test appveyor* .appveyor | 106 | rm -rf makedist Makefile GNUmakefile configure .travis.yml .gitignore test appveyor* .appveyor |
| 104 | cd .. | 107 | cd .. |
| 105 | zip -r ../"$out-win32.zip" "$out-win32" | 108 | zip -r ../"$out-win32.zip" "$out-win32" |
| 109 | rm -f ../"$out-win32.zip.asc" | ||
| 106 | cd .. | 110 | cd .. |
| 107 | rm -rf "release-windows" | 111 | rm -rf "release-windows" |
| 112 | |||
| 113 | if [ "$1" = "binary" ] | ||
| 114 | then | ||
| 115 | shift | ||
| 116 | |||
| 117 | ./configure | ||
| 118 | |||
| 119 | make binary | ||
| 120 | cd build-binary | ||
| 121 | mkdir "$out-linux-x86_64" | ||
| 122 | cp luarocks.exe "$out-linux-x86_64/luarocks" | ||
| 123 | cp luarocks-admin.exe "$out-linux-x86_64/luarocks-admin" | ||
| 124 | zip "../$out-linux-x86_64.zip" "$out-linux-x86_64"/* | ||
| 125 | cd .. | ||
| 126 | rm -f "$out-linux-x86_64.zip.asc" | ||
| 127 | |||
| 128 | make windows-binary | ||
| 129 | cd build-windows-binary | ||
| 130 | mkdir "$out-windows-32" | ||
| 131 | cp luarocks.exe "$out-windows-32/luarocks.exe" | ||
| 132 | cp luarocks-admin.exe "$out-windows-32/luarocks-admin.exe" | ||
| 133 | zip "../$out-windows-32.zip" "$out-windows-32"/* | ||
| 134 | cd .. | ||
| 135 | rm -f "$out-windows-32.zip.asc" | ||
| 136 | |||
| 137 | fi | ||
| 138 | |||
| 139 | if [ "$1" = "sign" ] | ||
| 140 | then | ||
| 141 | shift | ||
| 142 | |||
| 143 | for f in \ | ||
| 144 | $out-windows-32.zip \ | ||
| 145 | $out-linux-x86_64.zip \ | ||
| 146 | $out-win32.zip \ | ||
| 147 | $out.tar.gz | ||
| 148 | do | ||
| 149 | [ -e "$f" -a ! -e "$f.asc" ] && gpg --armor --output "$f.asc" --detach-sign "$f" | ||
| 150 | done | ||
| 151 | fi | ||
