diff --git a/.gitignore b/.gitignore index 3ff0944e06195639d9f99bbee5b74ec49434a418..c1f922a50f8a1931ef703fa0be9d7badb23e6d1d 100644 --- a/.gitignore +++ b/.gitignore @@ -2,11 +2,9 @@ make/ common-lisp.net .vcs -GNUmakefile init-lisp.lisp website/changelog.xml -moptilities.tar.gz website/output/ test-results/ lift-local.config diff --git a/GNUmakefile b/GNUmakefile new file mode 100644 index 0000000000000000000000000000000000000000..301839c78e8ecd033e761506422549de5f52ef78 --- /dev/null +++ b/GNUmakefile @@ -0,0 +1,42 @@ +system := "asdf" +#user := $(shell basename `echo "$home"`) +user := "gking" +webhome_private := $(user)@common-lisp.net:/project/asdf/public_html/ +webhome_public := "http://common-lisp.net/project/asdf/" +clnet_home := "/project/asdf/public_html/" + +sourceDirectory := $(shell pwd) + +# website, tag, install + +install: archive-copy + +archive: FORCE + bin/build-tarball.sh + +archive-copy: archive + bin/rsync-cp.sh tmp/asdf*.tar.gz $(webhome_private)/archives + bin/link-tarball.sh $(clnet_home) $(user) + bin/rsync-cp.sh tmp/asdf.lisp $(webhome_private) + +website-copy: FORCE + bin/rsync-cp.sh website/output/ $(webhome_private) + bin/rsync-cp.sh tmp/asdf.lisp $(webhome_private) + +clean_dirs = $(sourceDirectory) +clean_extensions = fasl dfsl cfsl fasl fas lib + +clean: FORCE + @for dir in $(clean_dirs); do \ + if test -d $$dir; then \ + echo Cleaning $$dir; \ + for ext in $(clean_extensions); do \ + find $$dir \( -name "*.$$ext" \) \ + -and -not -path \""*/.git/*"\" \ + -and -not -path \""*/_darcs/*"\" \ + -and -not -path \""*/tags/*"\" -print -delete; \ + done; \ + fi; \ + done + +FORCE: \ No newline at end of file diff --git a/bin/build-tarball.sh b/bin/build-tarball.sh new file mode 100755 index 0000000000000000000000000000000000000000..1dda8290aeaed36772532475206f2366998a4ef7 --- /dev/null +++ b/bin/build-tarball.sh @@ -0,0 +1,25 @@ +#!/bin/sh + +# create tarball and tagged asdf.lisp file in tmp/ using the most recent +# annotated tag + + +tag=`git describe --tags` +if [ "$tag" == "" ]; then + echo "Unable to find most recent tag, exiting" + exit 1 +fi + +if [ -d "tmp" ]; then + rm -r tmp +fi +mkdir tmp + +archive_file="tmp/asdf-$tag.tar.gz" + +echo "Create tmp/asdf.tar.gz with tag $tag" +git archive $tag --prefix="asdf/" --format=tar | \ + gzip > $archive_file +echo "Extract tmp/asdf.lisp" +tar --to-stdout -zxf $archive_file asdf/asdf.lisp > tmp/asdf.lisp + diff --git a/bin/link-tarball.sh b/bin/link-tarball.sh new file mode 100755 index 0000000000000000000000000000000000000000..b764dedd200b2fad432a6cd63870c379dfd25c4c --- /dev/null +++ b/bin/link-tarball.sh @@ -0,0 +1,20 @@ +#!/bin/sh + +if [ -z $1 ]; then + echo "Remote directory must be specified." + exit 1 +fi +if [ -z $2 ]; then + echo "Remote username must be specified." + exit 1 +fi +clnet_home="$1" +user=$2 + +tarball=`ls tmp/asdf*.tar.gz` +tarball=`basename $tarball` +latest="asdf.tar.gz" + +echo "Link $tarball to $latest" +ssh $user@common-lisp.net "rm -f $clnet_home$latest; \ + ln -s $clnet_home/archives/$tarball $clnet_home$latest" diff --git a/bin/rsync-cp.sh b/bin/rsync-cp.sh new file mode 100755 index 0000000000000000000000000000000000000000..d95e32386bbe7bf51a4ce6ed1de1613ac0368265 --- /dev/null +++ b/bin/rsync-cp.sh @@ -0,0 +1,13 @@ +#!/bin/sh + +# --extended-attributes \ + +rsync \ + --archive \ + --rsh=ssh \ + --compress \ + --partial \ + --include "*/" --include "*" \ + --progress \ + -v \ + $* diff --git a/bin/tag-release.sh b/bin/tag-release.sh new file mode 100755 index 0000000000000000000000000000000000000000..64b0b790cc9f4af08ffd1b772de4e065b4e23fd1 --- /dev/null +++ b/bin/tag-release.sh @@ -0,0 +1,27 @@ +#!/bin/sh + +# tag the currently checked out branch with $tag and update +# the tag RELEASE to point at this. $tag must not already exist. + +# create tarball and tagged asdf.lisp file in tmp/ + + +if [ -z $1 ]; then + echo "Tag must be specified." + exit 1 +fi + +tag=$1 +system="asdf" +git tag | grep -q $tag > /dev/null +if [ $? -eq 0 ]; then + echo "Tag $tag already exists. Exiting." + exit 1 +fi + +echo "Tagging with $tag" +git tag $tag +echo "Tagging with RELEASE" +git tag -f RELEASE + +bin/build-tarball.sh