This repository was archived by the owner on Mar 19, 2019. It is now read-only.
File tree Expand file tree Collapse file tree 1 file changed +3
-13
lines changed Expand file tree Collapse file tree 1 file changed +3
-13
lines changed Original file line number Diff line number Diff line change @@ -13,29 +13,19 @@ function err() {
13
13
msg " $* " 1>&2
14
14
}
15
15
16
- function publish () {
16
+ function main () {
17
17
local module_version=$1
18
- local mmodule_name=$2
19
18
if [[ ! $module_version ]]; then
20
19
err " first parameter must be the version number of the module to publish"
21
20
return 10
22
21
fi
23
22
24
- if [[ ! $module_name ]]; then
25
- err " second parameter must be the name of the module to publish"
26
- return 10
27
- fi
28
-
29
- local target=" target/.atomist/node_modules/@atomist/${module_name} }"
30
- local package=" $target /package.json"
23
+ local package=" package.json"
31
24
local tmp_package=" $package .tmp"
32
25
if ! jq --arg tag " $TRAVIS_TAG " ' .version = "$tag"' " $package " > " $tmp_package " ; then
33
26
err " failed to set version in $package "
34
27
return 1
35
28
fi
36
-
37
- cp " $tmp_package " " $package "
38
-
39
29
if [[ $NPM_TOKEN ]]; then
40
30
msg " Creating local .npmrc using API key from environment"
41
31
if ! ( umask 077 && echo " //registry.npmjs.org/:_authToken=$NPM_TOKEN " > " $HOME /.npmrc" ); then
@@ -56,5 +46,5 @@ function publish() {
56
46
fi
57
47
}
58
48
59
- publish " $@ " || exit 1
49
+ main " $@ " || exit 1
60
50
exit 0
You can’t perform that action at this time.
0 commit comments