Steve Purcell
da15f0e6c7
Merge pull request #607 from milkypostman/create-recipe-helpers
...
Helpers for recipe authors
2013-03-26 01:10:04 -07:00
Steve Purcell
7828be20df
Extract new pb/update-or-insert-version function
2013-03-25 14:23:47 +00:00
Steve Purcell
b2609a0a01
Extract default :files spec to a defconst
2013-03-24 13:17:25 +00:00
Steve Purcell
ae77c7ff77
Helpers for recipe authors
...
- Add helper function `package-build-create-recipe`
- Add `package-build-minor-mode`, enabled for recipes: C-c C-c builds current recipe
- Opening recipe files causes `package-build` to get loaded, and
`package-build-minor-mode` to get enabled
2013-03-24 13:10:45 +00:00
Steve Purcell
9d78285d60
Pop up the archive-contents buffer after package-build-current-recipe
2013-03-24 11:28:42 +00:00
Steve Purcell
cafc402e71
Add "dir" and "*.info" to the default :files spec
...
Since most packages do not have `dir` or `*.info` files, this required
changing the behaviour when a wildcard entry in `:file` expands to an
empty file list. Previously, an error would be raised in this case; now,
an error is raised only when the *entire* `:files` spec expands to an
empty file list.
The slight danger, then, is that certain build failures due to upstream
reorganisation of files might be less obvious.
2013-03-13 21:00:24 +00:00
Donald Curtis
23d30ceb0a
implement a better lazy loading of internal variables
2013-03-11 07:10:15 -05:00
Donald Curtis
0c0ee353e5
more typos...
2013-01-07 17:03:53 -06:00
Donald Curtis
2db7514abf
add missing initialize
2013-01-07 10:17:25 -06:00
Steve Purcell
c608db9192
Fix typo in package-build-reinitialize
2012-12-31 19:15:02 +00:00
Donald Curtis
4a526a4128
fix bug additional bug related to single builds
...
Because of some missing (package-build-initialize) calls, which were
mistyped, certain areas were not working. This fixes a few more of those typos.
2012-12-31 02:49:38 -06:00
Donald Curtis
8ec4cf3e2e
fix typo for initialization
2012-12-31 02:43:37 -06:00
Donald Curtis
c547ed422d
make read-recipe validate recipes
2012-12-30 22:28:03 -06:00
Donald Curtis
fb204b6429
add delayed initialization
...
the package-initialize function will not be called until it is needed.
by default this will be in any function that requires the variables
which it initializes. there is also a check so that the variables are
not repeatedly initialized.
2012-12-30 22:27:59 -06:00
Steve Purcell
3ee7f9f6aa
Use string-equals to compare wiki content hashes, not eq
2012-12-11 11:01:05 +00:00
Steve Purcell
01fd9ddcfc
Improve debug message output, and include build durations and timestamps
2012-12-05 14:08:40 +00:00
Steve Purcell
00236212d1
Store content hashes and timestamps for emacswiki files to minimise requests
...
If we can determine whether an emacswiki .el file has changed since
the last download, we can usually skip the follow-up request to
determine its last-modified timestamp.
2012-12-04 20:29:56 +00:00
Steve Purcell
00989cef16
Require lisp-mnt at the top level to avoid byte-compilation warnings
2012-12-04 20:29:56 +00:00
Steve Purcell
27f863039b
Don't complain about use of cl functions
2012-12-02 16:06:14 +00:00
Steve Purcell
db731db9d9
Fix byte compilation warning; use string-to-number instead of nonexistent parse-integer
2012-12-02 16:05:44 +00:00
Dmitry Gutov
bcd3ee7a02
The empty line(s) can be commented out or have whitespace
2012-11-29 09:36:12 +04:00
Dmitry Gutov
b66ca67da6
Remove the leading blank line in the readmes
2012-11-29 09:19:05 +04:00
Donald Curtis
521ccf03e0
Write the readme.txt files
...
Fixes #306
2012-11-09 10:51:29 -06:00
Steve Purcell
4b451f5dc7
Handle newer CVS date formats like "2001/08/26 22:16:22" which break date-to-time
2012-10-20 20:22:28 +01:00
Steve Purcell
a69ee2af7e
Force UTC timezone for cvs log
2012-10-20 20:21:52 +01:00
Donald Curtis
e20c3159ec
default head branch to "master"
2012-09-16 19:23:39 -05:00
Donald Curtis
87346e3cc1
Reset git repos to the HEAD branch on the remote.
...
Not all repositories use 'master' as the name of the master branch. Therefore, we need to query the remote server and see which branch is actually supposed to be tracked by default.
2012-09-16 18:11:21 -05:00
Steve Purcell
3a354296db
Display the "waiting" time between EmacsWiki requests using fewer decimal places
2012-09-16 09:01:53 +01:00
Steve Purcell
5a96d65f6e
Update git working dirs by using "remote update" then "reset --hard", in case of upstream forces
2012-09-15 20:27:09 +01:00
Steve Purcell
fed0c212bd
Introduce pb/slurp-file, and use it to remove some duplication
2012-09-15 13:14:52 +01:00
Steve Purcell
3c4546c6e8
Remove debugging output for date parsing (causes too many messages when scanning cvs logs)
2012-09-15 13:13:55 +01:00
Sebastian Wiesner
9592064902
Rename :cvs-module to :module
2012-09-15 13:55:15 +02:00
Sebastian Wiesner
9590a38d35
[ #177 ] Add support for CVS
2012-09-14 18:35:16 +02:00
Steve Purcell
9ddf14d643
If the last update to a package was at midnight, ensure the HHMM part of version is "0", not ""
...
See purcell/emacs.d#47
2012-09-06 14:23:41 +01:00
Steve Purcell
55139921af
Don't just remove *one* padding zero if there are two
2012-09-01 17:23:25 +01:00
Steve Purcell
84f54dd5fe
Ensure no zero-padding is used in the HHMM portion of version strings
2012-09-01 15:37:26 +01:00
Steve Purcell
efdbd825d5
Add .HHMM to versions so changes to frequently-updated packages can be detected ( fixes #250 )
2012-09-01 14:02:23 +01:00
Steve Purcell
84bd0175dc
Autoload a couple of the main interactive functions
2012-08-11 11:43:10 +01:00
Steve Purcell
a0e1212b3f
Add handy interactive package-build-current-recipe function
2012-08-11 11:42:44 +01:00
Steve Purcell
fdae5acf11
Use archive.json to populate the html package index, rather than ad-hoc sexp parsing
2012-07-25 14:01:04 +01:00
Donald Curtis
e13825d49a
add a newline at the end of output
2012-07-24 17:11:15 -05:00
Georgi Valkov
3f533208c5
Add functions that export to json
...
The list of recipies and the packages in the archive can be serialized
to json with:
- package-build-alist-as-json
- package-build-archive-alist-as-json
The json files can be used to simplify the generation of the html index
or serve as some form of API for non-lisp clients.
2012-07-21 15:31:47 -05:00
Donald Curtis
605b7a0ac7
Search files for "-pkg.el" file.
...
This will fix problems when the "-pkg.el" file is located in a
subdirectory as long as that file is included in the ":files" list
specified by the recipe, which *should* be the case anyways because
you would want that file installed as part of the package.
2012-07-03 12:22:45 -05:00
Donald Curtis
6c467379c2
don't downcase names of packages
2012-05-29 14:53:19 -05:00
Donald Curtis
42ac78dad8
Ignore duplicate files in tar.
...
Sometimes the name-pkg.el file is included but gets included twice
because we also add our own version. This causes problems when
installing. The `tar' will list both files and extract only one and
the tar mode for Emacs doesn't behave nicely.
2012-05-14 10:02:37 -05:00
Steve Purcell
e487e9ebf1
Enforce checkdoc-minor-mode
2012-05-07 11:43:21 +01:00
Donald Curtis
e456ea3cbf
Hotfix to let build continue after error.
2012-05-06 08:21:44 -05:00
Steve Purcell
73cd32ccae
Make 'package-build-archive-ignore-errors prompt for package name when called interactively
2012-05-06 12:13:12 +01:00
Steve Purcell
8be7c714c7
Simplify the functions dealing with source/dest file paths (see #97 )
...
This commit introduces pb/expand-file-specs, which expands a :files
list into a list of (SOURCE . DEST) pairs -- SOURCE is the relative
path of a source file or directory, and DEST is the relative path to
which it should be copied. By mapcar'ing this list, it's then easy to
get lists of the source and destination files, and copying files
becomes as easy as copying each SOURCE to its corresponding DEST.
2012-05-06 09:48:13 +01:00
Steve Purcell
c9220870ed
Normalise the file-list functions so they can be assessed for similarities
2012-05-06 09:48:13 +01:00
Steve Purcell
c269f0ef82
Remove some duplication by introducing pb/expand-source-file-list
2012-05-05 08:48:17 +01:00
Steve Purcell
8e8696fa14
Use idiomatic "not" in place of "(zerop (length lst))"
2012-05-04 20:34:28 +01:00
Steve Purcell
f17809801c
Fix compilation warnings about references to free variables
2012-05-04 20:33:25 +01:00
Donald Curtis
000bffabf6
On error return nil
2012-05-03 21:04:06 -05:00
Donald Curtis
203315d8cd
Clean out debugging code. Add others.
2012-05-03 21:03:10 -05:00
Donald Curtis
e54824d6c3
Dump error backtrace to stderr while ignoring errors.
2012-05-03 20:46:16 -05:00
Donald Curtis
2f7bfdd9d0
use ;;;
to denote package name
2012-05-03 20:46:16 -05:00
Donald Curtis
65aaef511a
use "source" and "target" consistently
2012-05-03 20:46:16 -05:00
Donald Curtis
a6e1dbe977
New style :files directive in recipes.
2012-05-03 20:25:49 -05:00
Donald Curtis
743322efcf
Fix builds where the *-pkg.el file is in a subdirectory (prefix)
2012-05-02 15:53:27 -05:00
Steve Purcell
2bdf9d0a87
Don't interpret PREFIX as a regexp in pb/remove-prefix
2012-05-01 14:24:14 +01:00
Steve Purcell
c5f641f8fb
Rename pathpfx variable for clarity
2012-05-01 14:24:14 +01:00
Steve Purcell
afb0db688d
Eliminate side effects in pb/remove-prefix, and note that the prefix is a regexp
2012-05-01 14:24:14 +01:00
Steve Purcell
fa271f3c9a
Fix all checkdoc warnings
2012-05-01 14:24:14 +01:00
Donald Curtis
198dbe1a9f
Remove path prefix before tar creation.
...
Closes #97
2012-05-01 07:32:08 -05:00
Donald Curtis
41fdeb80d3
Fix expansion problem of bzr repos.
2012-04-30 17:24:48 -05:00
Donald Curtis
310ca31c8d
Expand bzr repos to canonical path.
2012-04-30 16:03:22 -05:00
Donald Curtis
2bebebbcd6
Add function to parse line from run-process.
...
It is very common to find a regex match after running a process, so
make a function for this.
2012-04-30 15:59:33 -05:00
Donald Curtis
abbe137e38
Copy files for multi-file packages as individuals, rather than duplicating the repository.
2012-04-30 15:29:49 -05:00
Donald Curtis
dcf97c7df6
Delete package staging directory before building.
2012-04-29 20:01:04 -05:00
Donald Curtis
cc929e15d5
fix indentation
2012-04-29 19:54:35 -05:00
Donald Curtis
54d80f1f0b
Throw an error if no files are found within the package.
2012-04-29 19:52:23 -05:00
Steve Purcell
ead0703746
Report an error when elisp on EmacsWiki gets deleted upstream (as happened with rainbow-delimiters.el)
2012-04-24 20:07:44 +01:00
Donald Ephraim Curtis
9c652e306e
Remove the "Credits" section.
2012-04-24 13:17:14 -05:00
Steve Purcell
380c231e1f
Add my name to the copyright
2012-04-24 19:01:35 +01:00
Steve Purcell
fdfe060ecf
Check more strictly that -pkg files contain a single define-package expression (see #92 )
2012-04-24 08:11:16 +01:00
Steve Purcell
eca898099d
Handle elisp files which have no "version" header, but are otherwise well-formatted
2012-04-22 08:52:20 +01:00
Steve Purcell
b5f5bbc7b0
Don't leave modified buffers open after looking for package info in files
2012-04-22 08:51:52 +01:00
Steve Purcell
ae8e8ec191
Prefer mapc over dolist when an iteration variable is not required
2012-04-22 08:39:25 +01:00
Donald Curtis
869f22f2be
princ should be message in update/checkout messages
2012-04-21 15:05:37 -05:00
Donald Curtis
b47382e904
Don't print pkg-info.
2012-04-21 15:00:57 -05:00
Donald Curtis
8b47179b4d
default to `message' for everything except full-build information.
2012-04-21 15:00:17 -05:00
Donald Curtis
db9d32ee99
Cleanup script output.
2012-04-21 14:36:37 -05:00
Donald Curtis
682efd1d22
Cleanup output a bit. Only print certain things to stdout, rest to stderr.
2012-04-21 13:57:58 -05:00
Donald Curtis
004c9ae5ce
Print packages that fail to build when building every package.
...
Closes #72
2012-04-21 13:57:23 -05:00
Donald Curtis
005697cbde
additional long line formatting.
2012-04-21 12:10:06 -05:00
Donald Curtis
760e37e385
Cleanup long lines where it can be avoided (like it doc strings)
2012-04-21 12:08:45 -05:00
Donald Curtis
60be41f73b
fix timestamp search problem with hg
.
...
introduced in a971eeddd5
see #79
2012-04-21 12:01:01 -05:00
Steve Purcell
d86ed7e2c0
Don't require network connection when looking up URL for current git remote
2012-04-20 17:56:17 +01:00
Steve Purcell
6e25a6da87
Extract looping logic used to find most recent svn timestamp (see #79 )
2012-04-20 17:56:17 +01:00
Steve Purcell
142e1a2506
Correctly determine last commit timestamp for a set of darcs files (see #79 )
2012-04-20 17:56:16 +01:00
Steve Purcell
106834fc73
Pull default "*.el" pattern up into 'pb/expand-file-list
2012-04-18 11:07:03 +01:00
Steve Purcell
a971eeddd5
Correctly determine last commit timestamp for a set of hg files (see #79 )
2012-04-18 11:02:09 +01:00
Steve Purcell
05f920a494
Correctly determine last commit timestamp for a set of bzr files (see #79 )
2012-04-18 10:45:15 +01:00
Steve Purcell
c0f349295a
Fix references to non-local variables
2012-04-18 10:40:11 +01:00
Donald Curtis
0164ab69a2
Ignore trailing / on subversion packages.
2012-04-17 15:42:36 -05:00
Donald Curtis
2dc9a2bd47
Only consider timestamps for files in packages for Subversion recipes.
2012-04-17 15:42:23 -05:00
Donald Curtis
565ee2017b
add a BOUND parameter to the timestamp parser
2012-04-17 15:27:34 -05:00
Donald Curtis
3e4c8ca859
For git packages, use the last changed of only files in the package.
2012-04-17 14:50:25 -05:00
Donald Curtis
759ec4f2d0
remove unused functions.
2012-04-17 14:25:36 -05:00
Steve Purcell
6dc2d0fb9f
After build, remove pre-built packages for which no recipe exists (see #76 )
2012-04-17 12:00:31 +01:00
Steve Purcell
225d18964a
Tidy up build-all functions
2012-04-17 10:42:51 +01:00
David Leatherman
252137632d
Moved config argument to the end
2012-04-12 09:12:40 -04:00
David Leatherman
aad9c41d76
Updated source tag to simply [source: <src>]
2012-04-12 07:52:07 -04:00
David Leatherman
4119ac1741
Add the package source to the package description
2012-04-11 19:10:01 -04:00
Bozhidar Batsov
26a2f6318e
added Mercurial support
2012-04-11 14:56:29 +03:00
Bozhidar Batsov
40f0e5eef3
fixed #33 - added bazaar support
2012-04-11 14:21:57 +03:00
Steve Purcell
cae2ac3513
Add a specialized "github" fetcher, as a shorthand for corresponding git URLs ( fixes #34 )
2012-04-09 20:37:45 +01:00
Steve Purcell
2b1afde6f3
Keep recipes in individual files inside the "recipes" subdirectory.
2012-04-06 20:52:51 +01:00
Steve Purcell
3bf025e659
Explicitly default :files to "*.el", expanded after check-out.
...
This resolves the inconsistency wherein an empty :files value meant "every
file" for git packages, but just "package-name.el" for wiki packages.
It also allows the removal of most :files values in the pkglist, since
"*.el" is almost always the Right Value.
2012-03-24 11:04:42 -05:00
Steve Purcell
84240090e4
Fix accidental breakage of implicitly multi-file packages like magit
2012-03-19 14:56:36 +00:00
Steve Purcell
15efde743d
Consistently use "wiki" rather than "emacswiki" in fn/var names
2012-03-19 14:17:16 +00:00
Steve Purcell
badee655ee
Support multi-file emacswiki packages, with rate-limiting of http requests
2012-03-19 12:50:51 +00:00
Donald Curtis
9470f40e4f
Re-clone if repository has changed.
2012-03-17 13:45:55 -05:00
Donald Curtis
0c6c84c04b
Delete checkout directory if it already exists.
...
In certain cases we are doing a clone (checkout) and the directory
we're cloning to already exists, this makes sure that the we delete it
before doing the clone.
2012-03-17 13:39:26 -05:00
Donald Curtis
a6e79d651b
version of package-build-archives that ignores errors so that other
...
packages will complete even if one doesn't.
right now if an error occurs, the build-all will stop, but in most
cases build-all should continue through the rest.
2012-03-17 12:39:44 -05:00
Steve Purcell
429aa60880
Check for sentinel version control files/dirs inside working dirs, to avoid errors
...
A problem existed prior to this commit: if a package was changed from
darcs to git, then running "git pull" in the package's working dir
would silently perform that git operation in the root of the Melpa
repo. Checking that the version control for a working dir is as
expected prevents this issue.
2012-03-16 14:33:12 +00:00
Steve Purcell
3697b36d06
Raise error when 'pb/run-process exits with a non-zero code.
2012-03-16 14:30:13 +00:00
Steve Purcell
51fdff7d29
Explicitly provide 'package-build
2012-02-27 09:48:17 +00:00
Steve Purcell
b9666e7867
Stylistic fix for code chunk which was reassigning a var
2012-02-27 09:48:17 +00:00
Steve Purcell
18fe834e0a
Fail harder if asked to build an unknown package
2012-02-27 09:48:17 +00:00
Steve Purcell
b4856f8f3d
Group the internal functions and public interface functions together
2012-02-11 11:49:02 +00:00
Steve Purcell
932c878f66
Remove nil optional args in call to 'write-region
2012-02-11 11:42:19 +00:00
Steve Purcell
647189743d
Use shorter "pb/" prefix for internal functions to aid clarity
2012-02-09 21:34:32 +00:00
Steve Purcell
589ea72384
Tidy up attempt to use copy-seq to keep function side-effect free
2012-02-09 21:01:39 +00:00
Steve Purcell
c013231a48
Use "when" instead of "if" in the absence of an "else" expression
2012-02-09 21:00:42 +00:00
Steve Purcell
f31edc2997
Declare the build and archive alist vars early, and initialize them later.
...
This keeps the byte-compilation process happier, and allows melpa
developers to reload the pkglist file using "M-x package-build-initialize"
2012-02-03 14:46:55 +00:00
Steve Purcell
e65a8fc0b0
Ensure all functions are correctly namespaced
2012-02-03 14:39:16 +00:00
Steve Purcell
3924aa896d
Tidy up the fallback code for locating package info in .pkg, .pkg.in, and .el files
2012-02-02 20:30:15 +00:00
Donald Ephraim Curtis
fee98f4cdd
Fixed a bug when generating *-pkg.el files
...
Dependencies were not being properly generated, quoted lists of cons.
2012-02-02 13:20:43 -06:00
Steve Purcell
60083032da
Extract common code for updating pkg-info with new version
2012-01-31 14:23:27 +00:00
Steve Purcell
a7f748c14a
Rename a couple of function args for clarity
2012-01-31 14:02:42 +00:00
Steve Purcell
905854725f
Cursorily fix up all docstrings to pass checkdoc tests.
2012-01-31 10:52:02 +00:00
Steve Purcell
69d4ad65c2
Factor out code for writing pretty-printed sexps to disk
2012-01-31 10:52:02 +00:00
Steve Purcell
ebccd930c6
Remove unused package-change-list-elt function
2012-01-30 14:38:55 +00:00
Steve Purcell
ae4549fa16
Group the -build-checkout- functions together
2012-01-30 14:38:55 +00:00
Steve Purcell
c070959b20
Ensure that single-file wiki packages aren't bundled unnecessarily as tars
2012-01-30 14:38:47 +00:00
Steve Purcell
3fc3a0200e
Unify build-checkout functions so each can directly access the config options it needs
2012-01-30 12:46:44 +00:00
Steve Purcell
df77b0e0bf
Use "last edited" timestamp when fetching from emacswiki, and figure out URL automatically
2012-01-30 11:01:06 +00:00
Steve Purcell
82e4faa900
Shrink process-handling code in checkout functions
2012-01-29 13:13:14 +00:00
Steve Purcell
5b79bc94ca
Re-use package-read-from-file for reading package file and archive contents
2012-01-29 12:18:48 +00:00
Donald Ephraim Curtis
3f8ff0782a
Consolidate out time search and format.
2012-01-28 20:10:55 -06:00
Donald Ephraim Curtis
b76c0107c8
Fix a bug with a mismatch with single file packages.
...
With single file packages, the filename must match the package name.
2012-01-28 20:09:44 -06:00
Donald Ephraim Curtis
2fe4f63179
Added ability to checkout wiki-based packages.
2012-01-28 19:26:20 -06:00
Donald Ephraim Curtis
2a03ca3023
More credit to Purcell!!!
2012-01-28 18:17:45 -06:00
Donald Ephraim Curtis
c12ee029d9
Fix some long lines. Still a few long strings left.
2012-01-28 18:16:55 -06:00
Steve Purcell
e2e25c722a
Use 'completing-read in 'package-build-archive; helpful when debugging
2012-01-28 20:01:37 +00:00
Steve Purcell
81e9a89448
Support wildcards in :files option
2012-01-28 20:00:13 +00:00
Steve Purcell
07065fb330
Docstring fixes
2012-01-28 15:51:26 +00:00
Donald Ephraim Curtis
2767583ca6
hack for git packages that need to be *locked* a commit
2012-01-22 18:05:14 -06:00