| Daniel Stenberg | d28f749 | 2024-04-16 16:56:03 +0200 | [diff] [blame] | 1 | #!/bin/sh |
| 2 | # docker-maketgz |
| 3 | # |
| 4 | #*************************************************************************** |
| 5 | # _ _ ____ _ |
| 6 | # Project ___| | | | _ \| | |
| 7 | # / __| | | | |_) | | |
| 8 | # | (__| |_| | _ <| |___ |
| 9 | # \___|\___/|_| \_\_____| |
| 10 | # |
| 11 | # Copyright (C) Daniel Stenberg, <daniel@haxx.se>, et al. |
| 12 | # |
| 13 | # This software is licensed as described in the file COPYING, which |
| 14 | # you should have received as part of this distribution. The terms |
| 15 | # are also available at https://curl.se/docs/copyright.html. |
| 16 | # |
| 17 | # You may opt to use, copy, modify, merge, publish, distribute and/or sell |
| 18 | # copies of the Software, and permit persons to whom the Software is |
| 19 | # furnished to do so, under the terms of the COPYING file. |
| 20 | # |
| 21 | # This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY |
| 22 | # KIND, either express or implied. |
| 23 | # |
| 24 | # SPDX-License-Identifier: curl |
| 25 | # |
| 26 | ########################################################################### |
| 27 | |
| Daniel Stenberg | 7afb0e1 | 2024-04-16 23:54:08 +0200 | [diff] [blame] | 28 | set -eu |
| 29 | |
| Daniel Stenberg | d28f749 | 2024-04-16 16:56:03 +0200 | [diff] [blame] | 30 | version="${1:-}" |
| 31 | |
| 32 | if [ -z "$version" ]; then |
| Daniel Stenberg | d0afb33 | 2024-08-02 09:16:31 +0200 | [diff] [blame] | 33 | echo "Specify a version number!" |
| 34 | exit |
| Daniel Stenberg | d28f749 | 2024-04-16 16:56:03 +0200 | [diff] [blame] | 35 | fi |
| 36 | |
| Daniel Stenberg | bc5261a | 2024-05-10 08:50:47 +0200 | [diff] [blame] | 37 | timestamp="${2:-$(date -u +%s)}" |
| 38 | |
| Daniel Stenberg | d0afb33 | 2024-08-02 09:16:31 +0200 | [diff] [blame] | 39 | if test -f Makefile; then |
| 40 | make distclean |
| 41 | fi |
| Daniel Stenberg | d28f749 | 2024-04-16 16:56:03 +0200 | [diff] [blame] | 42 | docker build \ |
| andrewkirillov-ibm | 4bba14c | 2024-12-05 10:48:50 +0000 | [diff] [blame] | 43 | --no-cache \ |
| Daniel Stenberg | bc5261a | 2024-05-10 08:50:47 +0200 | [diff] [blame] | 44 | --build-arg SOURCE_DATE_EPOCH="$timestamp" \ |
| Daniel Stenberg | d28f749 | 2024-04-16 16:56:03 +0200 | [diff] [blame] | 45 | --build-arg UID="$(id -u)" \ |
| 46 | --build-arg GID="$(id -g)" \ |
| 47 | -t curl/curl . |
| 48 | |
| Daniel Stenberg | d0afb33 | 2024-08-02 09:16:31 +0200 | [diff] [blame] | 49 | docker run --rm -u "$(id -u):$(id -g)" \ |
| Daniel Stenberg | 7afb0e1 | 2024-04-16 23:54:08 +0200 | [diff] [blame] | 50 | -v "$(pwd):/usr/src" -w /usr/src curl/curl sh -c " |
| 51 | set -e |
| 52 | autoreconf -fi |
| 53 | ./configure --without-ssl --without-libpsl |
| 54 | make -sj8 |
| Daniel Stenberg | 5c14d69 | 2024-09-05 16:31:38 +0200 | [diff] [blame] | 55 | ./scripts/maketgz $version" |