Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

added git work, and main script

  • Loading branch information...
commit 6cc26a9351c6bc74c9f78edf132bf9579ad5bcb0 1 parent c8d2b74
wbamberg wbamberg authored
8 docs-tools/clean_releases.sh
View
@@ -1,8 +0,0 @@
-cd sdk
-rm -rf *
-rm -f .DS_Store
-cd working
-rm -rf *
-rm -f .DS_Store
-cd ..
-rmdir working
2  docs-tools/git_clean.sh
View
@@ -0,0 +1,2 @@
+rm -rf sdk/*
+git rm sdk/*
3  docs-tools/git_commit.sh
View
@@ -0,0 +1,3 @@
+git add sdk/*
+git commit -m "add $1 docset"
+git tag -a (CANDIDATE VERSION)-amo -m "tagged $1 docset"
2  docs-tools/git_prepare_commit.sh
View
@@ -0,0 +1,2 @@
+rm -rf sdk/*
+git rm sdk/*
1  docs-tools/git_push.sh
View
@@ -0,0 +1 @@
+git push --tags origin master
51 docs-tools/make_webdocs.sh
View
@@ -1,40 +1,21 @@
-mkdir sdk/$1
-mkdir sdk/$2
-mkdir sdk/$3
+# prepare git for a fresh set of docs
+#bash git_prepare_commit.sh
-mkdir working
-cd working
-mkdir $1
-mkdir $2
-mkdir $3
+pos=$(expr $1 : '[0-9,\.]*')
+latest_version=${1:0:$pos}
-function get_release {
- cd $1
- curl -O https://ftp.mozilla.org/pub/mozilla.org/labs/jetpack/addon-sdk-$1.tar.gz
- tar -xf addon-sdk-$1.tar.gz
- cd addon-sdk-$1
- source bin/activate
- cfx sdocs
- tar -xf addon-sdk-docs.tgz
- mv addon-sdk/doc/static-files/base.html ../../../sdk/$1
- cd ../../
-}
+# get the releases and generate docs for them
+latest_version_tag=$1
+old_version1=$2
+old_version2=$3
+bash get_releases.sh $latest_version_tag $old_version1 $old_version2
-# get the latest release
-cd $1
-git clone https://github.com/mozilla/addon-sdk.git
-cd addon-sdk
-git checkout $1
-source bin/activate
-pos=$(expr $1 : '[0-9,\.]*')
-echo ${1:0:$pos}
-cfx sdocs --override-version=$1
-tar -xf addon-sdk-docs.tgz -C ../../../sdk/$1
-cd ../../
+# obsolete old versions
+pos=$(expr $latest_version_tag : '[0-9,\.]*')
+latest_version=${1:0:$pos}
-# get the second release
-get_release $2
-get_release $3
+python obsolete.py $old_version1 $latest_version $4
+python obsolete.py $old_version2 $latest_version $4
-#obsolete $2
-#obsolete $3
+# make the commit
+#bash git_commit.sh
8 docs-tools/obsolete.py
View
@@ -48,7 +48,6 @@ def obsolete(obsoleted, latest, mappings):
if not filename.endswith(".html"):
continue
path_and_filename = os.sep.join([dirpath, filename])
- print path_and_filename
# first, look for a replacement in mappings
replacement_path_and_filename = mappings.get(path_and_filename, "")
if replacement_path_and_filename:
@@ -61,12 +60,12 @@ def obsolete(obsoleted, latest, mappings):
if os.path.exists(replacement_path_and_filename):
insert_notice(path_and_filename, replacement_path_and_filename, OBSOLETE_NOTICE_POSTAMBLE)
continue
- # otherwise consider this file is missing, and point to index.html
+ # otherwise consider this file is removed, and point to index.html
latest_index = "/".join(["sdk", latest, "index.html"])
- insert_obsolete_notice(path_and_filename, latest_index)
+ insert_notice(path_and_filename, latest_index, REMOVED_NOTICE_POSTAMBLE)
missing_files.append(path_and_filename)
- print "\n\nCould not find a replacement for the following files:"
+ print "Could not find a replacement for the following files:"
for missing_file in sorted(missing_files):
print " "+ missing_file
@@ -82,6 +81,5 @@ def read_mappings(mappings_file):
mappings = read_mappings(sys.argv[3])
else:
mappings = {}
- #mappings = {"sdk/1.10/packages/api-utils/message-manager.html":"sdk/1.11rc1/index.html"}
obsolete(sys.argv[1], sys.argv[2], mappings)
2  docs-tools/obsolete_releases.sh
View
@@ -1,2 +0,0 @@
-
-python obsolete.py $1 $2
Please sign in to comment.
Something went wrong with that request. Please try again.