Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

snapshots: import into git #369

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ all: $(PAGES)
cd dev && make
cd windows && make
cd qnx && make
cd snapshots && make
cd tiny && make
cd logo && make
cd trurl && make
Expand Down
20 changes: 20 additions & 0 deletions snapshots/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
ROOT=..

SRCROOT=$(ROOT)/cvssource
DOCROOT=$(SRCROOT)/docs

include $(ROOT)/mainparts.mk
include $(ROOT)/setup.mk

PAGES=index.html

all: $(PAGES)

index.html: _index.html $(MAINPARTS) files.gen
$(ACTION)

files.gen: mkindex.pl curl-*
./mkindex.pl >$@

clean:
rm -f $(PAGES) *.gen
67 changes: 67 additions & 0 deletions snapshots/_index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
#include "_doctype.html"
<html>
<head> <title>daily curl snapshots</title>
#include "css.t"
</head>

#define CURL_URL /snapshots

#include "_menu.html"
#include "setup.t"

WHERE2(Download, "/download.html", Daily Snapshots)

TITLE(Daily curl snapshots)
<div class="relatedbox">
<b>Related:</b>
<br><a href="/auto/">Autobuilds</a>
<br><a href="https://github.com/curl/curl">Browse git</a>
<br><a href="/ch/">Changelog</a>
<br><a href="/dev/release-notes.html">Dev Release Notes</a>
<br><a href="/support.html">Support</a>
</div>
<p>
<b>WARNING</b>, these packages are built daily and automatically straight
from git. They may be broken, crashing, working or whatever. Don\'t assume
anything else!

SUBTITLE(Binary snapshots)
<ul>
<li><a href="https://github.com/pheiduck/curl-daily/releases">Arch Linux</a>
<li><a href="https://github.com/curl/curl-container/pkgs/container/curl-container%2Fcurl">Docker</a>
<li><a href="https://github.com/curl/curl-for-win/actions/workflows/daily.yml">Windows</a>
</ul>

<div style="float: right; width: 50%; margin-left: 2em;">
SUBTITLE(Source tarballs)
<p>
#include "files.gen"
</div>

SUBTITLE(Contents)
<p>
These snapshots are generated straight from git every euro morning. Snapshots
are kept a few weeks before deleted.

<p>
The <b>docs/RELEASE-TOOLS.md</b> document is bundled in every snapshot,
showing the tooling needed to reproduce the snapshot tarball. This is not
necessarily the same set of tools+versions as official curl releases use,
because these snapshots are generated automatically on a different host.

<p> Since August 2024, every snapshot contains a file named
<b>docs/tarball-commit.txt</b> that contains the commit hash that was the
HEAD at the time the tarball is made.

SUBTITLE(Extensions)
<p>
<ul>
<li> <b>tar.bz2</b> is the source tar archive bzip2 compressed
<li> <b>zip</b> is the source archive zip compressed
<li> <b>tar.xz</b> is the source tar archive xz compressed

</ul>

#include "_footer.html"
</body>
</html>
1 change: 1 addition & 0 deletions snapshots/curl-temp.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
# dummy
78 changes: 78 additions & 0 deletions snapshots/mkindex.pl
Original file line number Diff line number Diff line change
@@ -0,0 +1,78 @@
#!/usr/bin/perl

my $dir=".";
opendir(DIR, $dir) || die "can't opendir $dir: $!";
my @files = readdir(DIR);
closedir DIR;

sub filesize {
my ($filename)=@_;

my ($dev,$ino,$mode,$nlink,$uid,$gid,$rdev,$size,
$atime,$mtime,$ctime,$blksize,$blocks)
= stat($filename);

return $size;
}

for(@files) {
my $file = $_;
if($file =~ /^curl-([0-9.]*)-([0-9]*)\.(.*)/) {
my ($version, $date, $ext)=($1, $2, $3);
$dates{$date}=$date;
$exts{$date}.="$ext,";
$allext{$ext}++;
$file{$date.$ext}=$file;
$version{$date}=$version;
}
}

my $ae;
for(keys %allext) {
$ae .= "$_ ";
}

print <<MOO
<table class="daily" cellspacing="0" cellpadding="3">
<tr class="tabletop"><th>date</th>
MOO
;
for(sort split(" ", $ae)) {
print "<th>$_</th>\n";
}
print "</tr>\n";

my $i;
for(reverse sort keys %dates) {
my $date=$_;
$finedate = $date;
if($date =~ /(\d\d\d\d)(\d\d)(\d\d)/) {
$finedate = sprintf("%04d-%02d-%02d", $1, $2, $3);
}

printf "<tr class=\"%s\"><td>$finedate</td> ",
$i++&1?"odd":"even";
for(sort split(" ", $ae)) {
my $ext=$_;
my $file = $file{$date.$ext};

if(-f "$dir/$file" ) {
if(!$bestfile{$ext}) {
print "<!--\n",
"NEWEST ${ext} $file\n",
"-->\n";
$bestfile{$ext}=1;
}


printf "<td><a href=\"${url}%s\">%.2fMB</a></td>",
$file, filesize("$dir/$file")/(1024*1024);
}
else {
print "<td>&nbsp;</td>\n";
}
}

print "</tr>\n";
}
print "</table>\n";
Loading