Skip to content

Commit a31d5f4

Browse files
committed
rename release option -upload to -asstes
1 parent c3191f1 commit a31d5f4

File tree

5 files changed

+15
-15
lines changed

5 files changed

+15
-15
lines changed

docs/commands/release.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ awesome-ci release <subcommand> [subcommand-option]
2929
| `-version` | overrides any version from git and, or patches the given string |
3030
| `-patchLevel` | overrides the patchLevel. make shure your following the alias definition. |
3131
| `-dry-run` | doesn't create a release. Prints out what it would do and check permissions |
32-
| `-upload` | (only available in publish) uploads the given Artifacts to a release. Eg.: `file=out/awesome-ci` |
32+
| `-assets` | (only available in publish) uploads the given Artifacts to a release. Eg.: `file=out/awesome-ci` |
3333
| `-releaseid` | (only available in publish) publishes an early defined release |
3434

3535

@@ -51,13 +51,13 @@ This can be useful in connection with `-version` when creating a manual release.
5151
awesome-ci createRelease -patchLevel feature
5252
```
5353

54-
#### -upload
54+
#### -assets
5555

56-
The `-patchLevel` option can updload a single or multiple artifacts.
56+
The `-assets` option can updload a single or multiple artifacts.
5757

5858
However, you must choose the format of the artefacts.
5959

60-
eg.: `-uploadArtifacts "file=path/to/file,file=path/to/second/file"`
60+
eg.: `-assets "file=path/to/file,file=path/to/second/file"`
6161

6262

6363
... more documentation to be done ;)

docs/examples/github_actions.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ jobs:
112112
key: awesome-ci-$\{\{ github.sha \}\}
113113

114114
- name: Publish Release
115-
run: awesome-ci release publish -releaseid "$ACI_RELEASE_ID" -upload "file=out/$ARTIFACT1,file=out/$ARTIFACT2"
115+
run: awesome-ci release publish -releaseid "$ACI_RELEASE_ID" -assets "file=out/$ARTIFACT1,file=out/$ARTIFACT2"
116116
env:
117117
GITHUB_TOKEN: $\{\{ secrets.GITHUB_TOKEN \}\}
118118
ACI_RELEASE_ID: $\{\{ needs.generate_infos.outputs.releaseid \}\}

main.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ func init() {
6767
releaseSet.Publish.Fs.IntVar(&releaseSet.Publish.PrNumber, "prnumber", 0, "overwrite the issue number")
6868
releaseSet.Publish.Fs.StringVar(&releaseSet.Publish.Version, "version", "", "override version to Update")
6969
releaseSet.Publish.Fs.StringVar(&releaseSet.Publish.PatchLevel, "patchLevel", "", "predefine version to Update")
70-
releaseSet.Publish.Fs.StringVar(&releaseSet.Publish.UploadArtifacts, "upload", "", "upload assets to release. eg.: \"file=awesome-ci\"")
70+
releaseSet.Publish.Fs.StringVar(&releaseSet.Publish.Assets, "assets", "", "upload assets to release. eg.: \"file=awesome-ci\"")
7171
releaseSet.Publish.Fs.Int64Var(&releaseSet.Publish.ReleaseId, "releaseid", 0, "publish an early defined release")
7272
releaseSet.Publish.Fs.BoolVar(&releaseSet.Publish.DryRun, "dry-run", false, "make dry-run before writing version to Git by calling it")
7373

src/acigithub/release.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ func PublishRelease(version string, releaseId int64, uploadArtifacts *string) (e
9898
}
9999

100100
for i, fileAndInfo := range filesAndInfos {
101-
fmt.Printf("uploading %s as asset to release", fileAndInfo.Name)
101+
fmt.Printf("uploading %s as asset to release\n", fileAndInfo.Name)
102102
// Upload assets to GitHub Release
103103
relAsset, _, err := GithubClient.Repositories.UploadReleaseAsset(
104104
ctx,

src/service/release.go

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -26,13 +26,13 @@ type ReleaseCreateSet struct {
2626
}
2727

2828
type ReleasePublishSet struct {
29-
Fs *flag.FlagSet
30-
Version string
31-
PatchLevel string
32-
ReleaseId int64
33-
UploadArtifacts string
34-
PrNumber int
35-
DryRun bool
29+
Fs *flag.FlagSet
30+
Version string
31+
PatchLevel string
32+
ReleaseId int64
33+
Assets string
34+
PrNumber int
35+
DryRun bool
3636
}
3737

3838
func ReleaseCreate(args *ReleaseCreateSet) {
@@ -109,7 +109,7 @@ func ReleasePublish(args *ReleasePublishSet) {
109109
fmt.Printf("Would publishing release: %s\n", version)
110110
} else {
111111
fmt.Printf("Publishing release: %s - %d\n", version, args.ReleaseId)
112-
acigithub.PublishRelease(version, args.ReleaseId, &args.UploadArtifacts)
112+
acigithub.PublishRelease(version, args.ReleaseId, &args.Assets)
113113
}
114114
}
115115

0 commit comments

Comments
 (0)