I wrote some helper bash scripts that will do some nice things to help with publishing packages to atmosphere. In particular, the publish-tool.sh
has an automatic mode that will attempt to correct any errors that occur in the publishing process and try to publish again. This is mainly meant for if you have many packages that work together and you want to publish them all, as wildcard expansion works. For example, if I had a dozen packages I wanted to publish all at once, rather than doing it manually, I could use this tool as:
$ ./publish-tool.sh -a /path/to/packages/*
There is also a version-tool.sh
that you can use to bump major, minor, or patch version numbers. This tool is used in publish-tool.sh
automatic mode if the version in question has already been published to automatically increment the patch number and try again.
In the future, I intend to add the following functionality:
- Automatically check to see if the package is using the most recent versions of the packages specified with
api.use
. I think this could be accomplished by creating a test meteor application, running meteor add PACKAGE
for each package specified with api.use
, then checking the version numbers against what exists in that test app after a meteor update
.
- Any other features that you think might be useful?
Let me know what you think!
Very nice! The fact that we canât use âmeteor createâ or âmeteor publishâ from within the packages directory is a pain, isnât it?
Iâve been tinkering around with some scripts for starrynight that do a little bit of related functionality⌠mostly just creating and publishing packages. The autoincrement and multi-publish is interesting and useful functionality I hadnât thought about.
This might be great functionality to roll into a node utility app, if youâre interested.
It would certainly be nice to have it all done in JS (because Iâll bet the parsing code is a lot easier haha), Iâm just not very good at native node programming. Do you have a link to your starrynight code that is similar so I could take a look and explore what you already have?
Well, grab a copy of the StarryNight repository here:
The bin/starrynight.js file has most all the commands and libraries youâll need to convert the bash script into a node utility. The -pattern command has maybe a good example of how to copy directories using command line arguments and callbacks.
bin/starrynight.js
If this seems like a direction youâre interested in, also have a look at the package.json file.
package.json
You can compile a new version of the utility by running ânpm install -g .â from the starrynight directory.
Iâm on the road right now, and the package create/clone commands arenât synced up to GitHub right now. Iâll probably push them up on Wednesday, as theyâre sort of on front-burner right now.
I know mrtbulkrelease from @raix is doing a great job with cfs packages.
How is this different?
1 Like
Itâs actually inspired by that, but I the npm install failed for me. So I wrote this so that it didnât need to depend on anything but bash. I tried for a while to get that working, but opted to just write one myself. Just another alternative!
1 Like
Oh, really? Iâd be curious to see what the problem was and see whether opening an issue on the mbr
repo could help solving the issue so others could use it without hitting the same wallâŚ
I have a similar script to automatically publish useraccounts packages.
Itâs not that elegant but itâs doing a good work 
1 Like
I opened an issue with my problem.
I like what youâre doing with your script to automatically update version references inside of the package.js files. I was thinking of doing something similar, but more globally through the following process:
-
grep "use(\w+:[\w-]+" package.js
- get the list of all included packages and parse the names out of this list
- Create a meteor project in /tmp/meteor-version-test
- Run
meteor add PACKAGE
for all packages in the above list
- Run
meteor update
- Parse versions.json for the most up-to-date version numbers
- Fix package.js to use most recent version numbers
rm -rf /tmp/meteor-version-test
I think this is the simplest way of ensuring that the package uses the most recent versions of packages automatically. I wish this was something that was done by the core. Like while publishing, have a message that says âthere is a more recent version of package XXXXXXâ.