Permalink
Browse files

Update/improve google-closure-library release scripts; CLJS-276

  • Loading branch information...
stuartsierra committed Aug 3, 2012
1 parent 93337c1 commit cb95d651f6671fca534ade864408e8f1d04524ea
@@ -1,54 +0,0 @@
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
- <modelVersion>4.0.0</modelVersion>
- <groupId>org.clojure</groupId>
- <artifactId>google-closure-library</artifactId>
- <version>0.0-790</version>
- <packaging>jar</packaging>
- <name>Google Closure Library</name>
-
- <url>http://code.google.com/p/closure-library/</url>
-
- <description>
- The Google Closure Library is a collection of JavaScript code
- designed for use with the Google Closure JavaScript Compiler.
-
- This non-official distribution was prepared by the ClojureScript
- team at http://clojure.org/
- </description>
-
- <licenses>
- <license>
- <name>The Apache Software License, Version 2.0</name>
- <url>http://www.apache.org/licenses/LICENSE-2.0.html</url>
- <distribution>repo</distribution>
- </license>
- </licenses>
-
- <organization>
- <name>Google</name>
- <url>http://www.google.com</url>
- </organization>
-
- <developers>
- <developer><name>Google, Inc.</name></developer>
- <developer><name>Mohamed Mansour</name><email>hello@mohamedmansour.com</email></developer>
- <developer><name>Bjorn Tipling</name><email>bjorn.tipling@gmail.com</email></developer>
- <developer><name>SameGoal LLC</name><email>help@samegoal.com</email></developer>
- <developer><name>Guido Tapia</name><email>guido.tapia@gmail.com</email></developer>
- <developer><name>Andrew Mattie</name><email>amattie@gmail.com</email></developer>
- <developer><name>Ilia Mirkin</name><email>ibmirkin@gmail.com</email></developer>
- <developer><name>Ivan Kozik</name><email>ivan.kozik@gmail.com</email></developer>
- <developer><name>Rich Dougherty</name><email>rich@rd.gen.nz</email></developer>
- </developers>
-
- <scm>
- <connection>scm:svn:http://closure-library.googlecode.com/svn/trunk</connection>
- <developerConnection>scm:svn:http://closure-library.googlecode.com/svn/trunk</developerConnection>
- <url>http://code.google.com/p/closure-library/source/browse/#svn/trunk</url>
- </scm>
-
- <issueManagement>
- <system>code.google.com</system>
- <url>http://code.google.com/p/closure-library/issues</url>
- </issueManagement>
-</project>
@@ -1,59 +0,0 @@
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
- <modelVersion>4.0.0</modelVersion>
- <groupId>org.clojure</groupId>
- <artifactId>google-closure-library-third-party</artifactId>
- <version>0.0-790</version>
- <packaging>jar</packaging>
- <name>Google Closure Library Third-Party Extensions</name>
-
- <url>http://code.google.com/p/closure-library/</url>
-
- <description>
- The Google Closure Library is a collection of JavaScript code
- designed for use with the Google Closure JavaScript Compiler.
-
- This non-official distribution was prepared by the ClojureScript
- team at http://clojure.org/
-
- This package contains extensions to the Google Closure Library
- using third-party components, which may be distributed under
- licenses other than the Apache license. Licenses for individual
- library components may be found in source-code comments.
- </description>
-
- <licenses>
- <license>
- <name>The Apache Software License, Version 2.0</name>
- <url>http://www.apache.org/licenses/LICENSE-2.0.html</url>
- <distribution>repo</distribution>
- </license>
- </licenses>
-
- <organization>
- <name>Google</name>
- <url>http://www.google.com</url>
- </organization>
-
- <developers>
- <developer><name>Google, Inc.</name></developer>
- <developer><name>Mohamed Mansour</name><email>hello@mohamedmansour.com</email></developer>
- <developer><name>Bjorn Tipling</name><email>bjorn.tipling@gmail.com</email></developer>
- <developer><name>SameGoal LLC</name><email>help@samegoal.com</email></developer>
- <developer><name>Guido Tapia</name><email>guido.tapia@gmail.com</email></developer>
- <developer><name>Andrew Mattie</name><email>amattie@gmail.com</email></developer>
- <developer><name>Ilia Mirkin</name><email>ibmirkin@gmail.com</email></developer>
- <developer><name>Ivan Kozik</name><email>ivan.kozik@gmail.com</email></developer>
- <developer><name>Rich Dougherty</name><email>rich@rd.gen.nz</email></developer>
- </developers>
-
- <scm>
- <connection>scm:svn:http://closure-library.googlecode.com/svn/trunk</connection>
- <developerConnection>scm:svn:http://closure-library.googlecode.com/svn/trunk</developerConnection>
- <url>http://code.google.com/p/closure-library/source/browse/#svn/trunk</url>
- </scm>
-
- <issueManagement>
- <system>code.google.com</system>
- <url>http://code.google.com/p/closure-library/issues</url>
- </issueManagement>
-</project>
@@ -2,7 +2,7 @@
<modelVersion>4.0.0</modelVersion>
<groupId>org.clojure</groupId>
<artifactId>google-closure-library-third-party</artifactId>
- <version>0.0-1376</version>
+ <version>RELEASE_VERSION</version>
<packaging>jar</packaging>
<name>Google Closure Library Third-Party Extensions</name>
@@ -2,7 +2,7 @@
<modelVersion>4.0.0</modelVersion>
<groupId>org.clojure</groupId>
<artifactId>google-closure-library</artifactId>
- <version>0.0-1376</version>
+ <version>RELEASE_VERSION</version>
<packaging>jar</packaging>
<name>Google Closure Library</name>
@@ -1,23 +0,0 @@
-#!/usr/bin/env bash
-
-set -e
-
-BASENAME=google-closure-library-0.0-1376
-
-jar cf $BASENAME.jar \
- -C ../closure-library-20111110-r1376 AUTHORS \
- -C ../closure-library-20111110-r1376 LICENSE \
- -C ../closure-library-20111110-r1376 README \
- -C ../closure-library-20111110-r1376/closure goog \
- -C ../closure-library-20111110-r1376/closure css
-
-## Uncomment these lines for an official release:
-
-# gpg --verbose --armor --detach-sign \
-# --default-key "Clojure/core (build.clojure.org Release Key version 2) <core@clojure.com>" \
-# $BASENAME.jar
-
-# gpg --verbose --armor --detach-sign \
-# --default-key "Clojure/core (build.clojure.org Release Key version 2) <core@clojure.com>" \
-# $BASENAME.pom
-
@@ -0,0 +1,87 @@
+#!/usr/bin/env bash
+
+set -e
+
+## Set the version numbers to download and release:
+
+ZIP_VERSION="20111110-r1376"
+RELEASE_VERSION="0.0-1376-2"
+
+## These only need to change if the URL or file names change:
+
+ZIP_BASE="closure-library-${ZIP_VERSION}"
+ZIP_FILE="${ZIP_BASE}.zip"
+ZIP_URL="http://closure-library.googlecode.com/files/${ZIP_FILE}"
+
+RELEASE_BASE="google-closure-library-${RELEASE_VERSION}"
+JAR_FILE="$RELEASE_BASE.jar"
+POM_FILE="$RELEASE_BASE.pom"
+
+THIRD_PARTY_RELEASE_BASE="google-closure-library-third-party-${RELEASE_VERSION}"
+THIRD_PARTY_JAR_FILE="$THIRD_PARTY_RELEASE_BASE.jar"
+THIRD_PARTY_POM_FILE="$THIRD_PARTY_RELEASE_BASE.pom"
+
+POM_TEMPLATE_FILE="google-closure-library.pom.template"
+THIRD_PARTY_POM_TEMPLATE_FILE="google-closure-library-third-party.pom.template"
+
+## Main script begins:
+
+cd `dirname $0`
+
+DATE=`date "+%Y%m%d%H%M%S"`
+WORKING="closure-release-${DATE}"
+
+rm -rf "$WORKING"
+mkdir "$WORKING"
+
+if [ ! -e "$ZIP_FILE" ]; then
+ curl "$ZIP_URL" -o "$ZIP_FILE"
+fi
+
+if [ ! -d "$WORKING/$ZIP_BASE" ]; then
+ ( cd "$WORKING" && unzip "../$ZIP_FILE" )
+fi
+
+cd "$WORKING"
+
+## Modify deps.js for third-party JAR; see CLJS-276:
+
+perl -p -i -e 's/..\/..\/third_party\/closure\/goog\///go' \
+ closure/goog/deps.js
+
+rm -f ./third_party/closure/goog/base.js \
+ ./third_party/closure/goog/deps.js
+
+## Build the JARs:
+
+jar cf "$JAR_FILE" \
+ AUTHORS \
+ LICENSE \
+ README \
+ -C closure goog \
+ -C closure css
+
+jar cf "$THIRD_PARTY_JAR_FILE" \
+ AUTHORS \
+ LICENSE \
+ README \
+ -C third_party/closure goog
+
+## Generate the POM files:
+
+perl -p -e "s/RELEASE_VERSION/$RELEASE_VERSION/go" \
+ "../$POM_TEMPLATE_FILE" \
+ > "$POM_FILE"
+
+perl -p -e "s/RELEASE_VERSION/$RELEASE_VERSION/go" \
+ "../$THIRD_PARTY_POM_TEMPLATE_FILE" \
+ > "$THIRD_PARTY_POM_FILE"
+
+## Uncomment these lines for an official release:
+
+# for FILE in "$JAR_FILE" "$THIRD_PARTY_JAR_FILE" "$POM_FILE" "$THIRD_PARTY_POM_FILE"
+# do
+# gpg --verbose --armor --detach-sign \
+# --default-key "Clojure/core (build.clojure.org Release Key version 2) <core@clojure.com>" \
+# "$FILE"
+# done
@@ -1,23 +0,0 @@
-#!/usr/bin/env bash
-
-set -e
-
-BASENAME=google-closure-library-third-party-0.0-1376
-
-jar cf $BASENAME.jar \
- -C ../closure-library-20111110-r1376 AUTHORS \
- -C ../closure-library-20111110-r1376 LICENSE \
- -C ../closure-library-20111110-r1376 README \
- -C ../closure-library-20111110-r1376/third_party/closure goog
-
-
-## Uncomment these lines for an official release:
-
-# gpg --verbose --armor --detach-sign \
-# --default-key "Clojure/core (build.clojure.org Release Key version 2) <core@clojure.com>" \
-# $BASENAME.jar
-
-# gpg --verbose --armor --detach-sign \
-# --default-key "Clojure/core (build.clojure.org Release Key version 2) <core@clojure.com>" \
-# $BASENAME.pom
-

0 comments on commit cb95d65

Please sign in to comment.