Commit Graph

145 Commits

Author SHA1 Message Date
Ken Robertson
d563c2714c Add support for downloading source artifacts from Github release
This adds support for retrieving the tarball or zip source artifact from a
Github release. This is done through defining a
"params.include_source_tarball" or "params.include_source_zip" boolean setting.

With this, the resource will download the respective source artfact into the
target directory as either "source.tar.gz" or "source.zip".
2015-09-23 14:22:21 -07:00
Toby Rumans
8508409f8a document the github access token scope
[finishes #102513822]

Signed-off-by: Evan Short <eshort@pivotal.io>
2015-09-11 17:39:28 -07:00
Evan Short
118b16110f remove draft releases from resource check command
[#102513822]

Signed-off-by: Toby Rumans <trumans@pivotal.io>
2015-09-11 17:30:53 -07:00
Toby Rumans
b694a6e9c9 remove latest release from github client
[#102513822]

Signed-off-by: Evan Short <eshort@pivotal.io>
2015-09-11 17:11:52 -07:00
Evan Short
22d247be7d Remove checking for nil version on in command
[#102513822]

Signed-off-by: Toby Rumans <trumans@pivotal.io>
2015-09-11 17:07:03 -07:00
Rob Dimsdale
6d9ae63167 Run tests with race flag and CGO_ENABLED=1
- CGO_ENABLED is required by the race detection. Even though CGO_ENABLED
  seems to hang around after ginkgo is run, the resultant binary still
  seems to run fine.

[#101623472]

Signed-off-by: Evan Short <eshort@pivotal.io>
2015-08-24 14:17:58 -07:00
Chris Brown
70d07f1a4c add usage examples to README 2015-08-21 11:35:43 -07:00
Alex Suraci
b682cc93ad do not fail if there are no releases
they might just not be created yet
2015-08-08 11:53:25 -07:00
Alex Suraci
d2c9a5e136 clean up pointerisms, fix building real client
google github library returns *Foo in singular case and []Foo if there
are many results. seems like the best approach is to pass them around
by-value, since *Foo seems to only be so that they can return 'nil'
instead of a zero-value.
2015-08-08 11:22:43 -07:00
Alex Suraci
79d0da629f Merge pull request #8 from zachgersh/master
Allow Github Resource to Fetch Private Assets
2015-08-08 10:28:42 -07:00
Zach
1ac06d9b3e Be more explicit about when access token is used.
Used during both the in and the out now.
2015-08-04 22:41:55 -07:00
zachgersh
9b77017aaf It's never pointers 2015-08-04 22:20:37 -07:00
zachgersh
65650bf3ea Remove google github library in favor of my fork 2015-08-04 10:13:56 -07:00
zachgersh
58da497c14 Move to custom fork of github library 2015-08-03 22:35:33 -07:00
zachgersh
b359439b85 Add github function to download assets
- Also refactor to allow getting a tagged version
2015-08-03 22:27:31 -07:00
Alex Suraci
2039bb67c8 add an 'i' 2015-07-25 08:39:12 -07:00
Chris Brown
3d99be0bca users can provide commitish when creating a release
[finishes #99189274]

Signed-off-by: Chris Walter <cwalter@pivotal.io>
2015-07-23 14:50:59 -07:00
Alex Suraci
bd263fd89d Merge pull request #4 from drnic/in-tag-file
[in] creates file 'tag' and 'version' containing git tag/version for the release being fetched
2015-04-25 20:03:35 +00:00
Alex Suraci
7117aafdbb Merge pull request #3 from drnic/update-semver
update to blang/semver HEAD
2015-04-25 20:03:28 +00:00
Dr Nic Williams
2c37f6d80c consolidate tag to version helpers 2015-04-25 12:58:49 -07:00
Dr Nic Williams
5779770b0b [in] create /version file based on git tag name 2015-04-25 12:46:22 -07:00
Dr Nic Williams
f224bc5a45 [in] creates file 'tag' containing git tag for the release being fetched 2015-04-25 12:28:47 -07:00
Dr Nic Williams
d5b1f57afc update to blang/semver HEAD 2015-04-25 11:57:13 -07:00
Chris Brown
c9acb4dfc6 return an error if any of the globs do not match
[finishes #91868284]

Signed-off-by: Toby Rumans <trumans@pivotal.io>
2015-04-06 11:22:09 -07:00
Alex Suraci
4dbe94c715 access token is now optional
* fix some err checks
* github api url can be configured (e.g. point it at an enterprise instance)

[finishes #89638752 #89633744]

Signed-off-by: Chris Brown <cbrown@pivotal.io>
2015-03-04 12:28:37 -08:00
Alex Suraci
9e289b62c6 woops that's important
Signed-off-by: Chris Brown <cbrown@pivotal.io>
2015-03-04 10:33:01 -08:00
Alex Suraci
4d368b7191 dereference pointer before printing it
[finishes #89575278]

Signed-off-by: Chris Brown <cbrown@pivotal.io>
2015-03-03 17:59:12 -08:00
Chris Brown
7e122d33ed add platform to build.yml 2015-02-25 16:19:28 -08:00
Alex Suraci
2ab978b6ea add logging to /out
Signed-off-by: Chris Brown <cbrown@pivotal.io>
2015-02-20 14:38:49 -08:00
Alex Suraci
330d632d62 clear out any existing release assets
[#76848252]

Signed-off-by: Chris Brown <cbrown@pivotal.io>
2015-02-20 11:06:47 -08:00
Alex Suraci
125bd204e4 update releases if they already exist
[#76848252]

Signed-off-by: Chris Brown <cbrown@pivotal.io>
2015-02-20 10:57:45 -08:00
Alex Suraci
c4436c0350 emit metadata in output
[#76848252]

Signed-off-by: Chris Brown <cbrown@pivotal.io>
2015-02-18 10:06:04 -08:00
Alex Suraci
3dc650adc8 add metadata to in command output
[#76848252]

Signed-off-by: Chris Brown <cbrown@pivotal.io>
2015-02-18 09:55:42 -08:00
Chris Brown
2878392b08 write progress while downloading assets
[#76848252]

Signed-off-by: Alex Suraci <asuraci@pivotal.io>
2015-02-18 09:54:44 -08:00
Chris Brown
8b3dc6edbe bump deps
Signed-off-by: Alex Suraci <asuraci@pivotal.io>
2015-02-17 18:08:25 -08:00
Chris Brown
efbfb91683 implement /in
fetches a given list of globs from the assets.

also be durable to 'v' prefixing version tags

Signed-off-by: Alex Suraci <asuraci@pivotal.io>
2015-02-17 18:03:42 -08:00
Chris Brown
7e47c2696e sort versions semantically
...rather than relying on api order

[#76848252]

Signed-off-by: Alex Suraci <asuraci@pivotal.io>
2015-02-17 10:37:42 -08:00
Chris Brown
0deda9939c implement check command 2015-02-01 12:39:45 +00:00
Chris Brown
b841ce205a godeps 2015-02-01 00:05:39 +00:00
Chris Brown
793c8a5019 test output resource 2015-01-31 23:53:38 +00:00
Chris Brown
f1b2ea069d add ci infrastructure 2015-01-31 23:06:07 +00:00
Chris Brown
a36b7368e7 add initial out command 2015-01-31 23:04:49 +00:00
Chris Brown
6780afd2ca add README docs 2015-01-31 22:41:18 +00:00
Chris Brown
19d6a09f29 add license 2015-01-31 22:38:05 +00:00
Chris Brown
26fcdb1793 implement empty check 2015-01-31 20:10:03 +00:00