Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
R
Rocket.Chat
Manage
Activity
Members
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Package Registry
Model registry
Operate
Terraform modules
Analyze
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
RocketChat
Rocket.Chat
Commits
b58774c1
Unverified
Commit
b58774c1
authored
1 year ago
by
Hugo Costa
Committed by
GitHub
1 year ago
Browse files
Options
Downloads
Patches
Plain Diff
chore: Improve bash script and add new detailed infos (#29066)
parent
574d3814
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
fuselage.sh
+106
-50
106 additions, 50 deletions
fuselage.sh
with
106 additions
and
50 deletions
fuselage.sh
+
106
−
50
View file @
b58774c1
#!/bin/bash
if
[[
$1
==
"--help"
||
$1
==
"-h"
]]
;
then
echo
"Usage: fuselage.sh -a link|undo|next|latest -p fuselage;fuselage-icons"
echo
"==================================================================================================
Usage: yarn fuselage -a [action] -p [package]
Options:
-a | --action [link|undo|unlink|next|latest|next-all|latest-all]
Specify the action to be performed by the script. This option accepts one of four arguments:
- link : Creates a symbolic link for the fuselage package
- undo|unlink : Removes the symbolic li nk for the fuselage package
- next : Update dependencies with the @next npm package version
- latest : Update dependencies with the @latest npm package version
- next-all : Update ALL fuselage dependencies with the @next npm packages version
- latest-all : Update ALL fuselage dependencies with the @latest npm packages version
-p | --package [package1;package2]
Specify the package where the symbolic link for the fuselage script should be created.
This option can contain multiple packages separated by a semicolon (;).
Example usage:
- Create a symbolic link in multiple fuselage packages:
yarn fuselage -a link -p fuselage;fuselage-icons;message-parser
- Remove the symbolic link:
yarn fuselage -a undo
- Update dependencies to the @rocket.chat/fuselage@next npm package version
yarn fuselage -a next -p fuselage
- Update dependencies to the @rocket.chat/fuselage@latest npm package version
yarn fuselage -a latest -p fuselage
- Update ALL fuselage dependencies with the @next npm packages version:
yarn fuselage -a next-all
- Update ALL fuselage dependencies with the @latest npm packages version:
yarn fuselage -a latest-all
=================================================================================================="
exit
1
fi
while
getopts
":a:p:"
opt
;
do
case
$opt
in
a
)
action
=
"
$OPTARG
"
;;
p
)
packages
=
"
$OPTARG
"
;;
\?
)
echo
"Invalid option -
$OPTARG
"
>
&2
exit
1
;;
esac
case
$OPTARG
in
-
*
)
echo
"Option
$opt
needs a valid argument"
exit
1
;;
esac
case
$opt
in
a
)
action
=
"
$OPTARG
"
;;
p
)
packages
=
"
$OPTARG
"
;;
\?
)
echo
"Invalid option -
$OPTARG
"
>
&2
echo
"Run yarn fuselage --help for more information"
exit
1
;;
esac
case
$OPTARG
in
-
*
)
echo
"Option
$opt
needs a valid argument"
echo
"Run yarn fuselage --help for more information"
exit
1
;;
esac
done
echo
"action:
$action
"
action
=
"
${
action
:-
link
}
"
packages
=
"
${
packages
:-
fuselage
}
"
if
[[
$action
!=
"link"
&&
$action
!=
"undo"
&&
$action
!=
'next'
&&
$action
!=
'latest
'
]]
;
then
if
[[
$action
!=
"link"
&&
$action
!=
"undo"
&&
$action
!=
"unlink"
&&
$action
!=
'next'
&&
$action
!=
'next-all'
&&
$action
!=
'latest'
&&
$action
!=
'latest-all
'
]]
;
then
echo
"Invalid action"
echo
"Run yarn fuselage --help for more information"
exit
1
fi
if
[[
$action
==
"next-all"
||
$action
==
"latest-all"
]]
;
then
if
[
"
$action
"
=
"next-all"
]
;
then
targetVersion
=
"next"
else
targetVersion
=
"latest"
fi
if
[[
$action
==
"next"
||
$action
==
"latest"
]]
;
then
eval
"yarn up @rocket.chat/emitter@
$action
@rocket.chat/fuselage-polyfills@
$action
@rocket.chat/fuselage-toastbar@
$action
@rocket.chat/fuselage-tokens@
$action
@rocket.chat/css-in-js@
$action
@rocket.chat/styled@
$action
@rocket.chat/fuselage@
$action
@rocket.chat/fuselage-hooks@
$action
@rocket.chat/icons@
$action
@rocket.chat/logo@
$action
@rocket.chat/memo@
$action
@rocket.chat/message-parser@
$action
@rocket.chat/onboarding-ui@
$action
@rocket.chat/string-helpers@
$action
@rocket.chat/ui-kit@
$action
@rocket.chat/layout@
$action
"
echo
"📦 @rocket.chat/emitter [UPDATING to
$targetVersion
version...]
📦 @rocket.chat/fuselage-polyfills [UPDATING to
$targetVersion
version...]
📦 @rocket.chat/fuselage-toastbar [UPDATING to
$targetVersion
version...]
📦 @rocket.chat/fuselage-tokens [UPDATING to
$targetVersion
version...]
📦 @rocket.chat/css-in-js [UPDATING to
$targetVersion
version...]
📦 @rocket.chat/styled [UPDATING to
$targetVersion
version...]
📦 @rocket.chat/fuselage [UPDATING to
$targetVersion
version...]
📦 @rocket.chat/fuselage-hooks [UPDATING to
$targetVersion
version...]
📦 @rocket.chat/icons [UPDATING to
$targetVersion
version...]
📦 @rocket.chat/logo [UPDATING to
$targetVersion
version...]
📦 @rocket.chat/memo [UPDATING to
$targetVersion
version...]
📦 @rocket.chat/message-parser [UPDATING to
$targetVersion
version...]
📦 @rocket.chat/onboarding-ui [UPDATING to
$targetVersion
version...]
📦 @rocket.chat/string-helpers [UPDATING to
$targetVersion
version...]
📦 @rocket.chat/ui-kit [UPDATING to
$targetVersion
version...]
📦 @rocket.chat/layout [UPDATING to
$targetVersion
version...]
📦 @rocket.chat/message-parser [UPDATING to
$targetVersion
version...]"
eval
"yarn up @rocket.chat/emitter@
$targetVersion
@rocket.chat/fuselage-polyfills@
$targetVersion
@rocket.chat/fuselage-toastbar@
$targetVersion
@rocket.chat/fuselage-tokens@
$targetVersion
@rocket.chat/css-in-js@
$targetVersion
@rocket.chat/styled@
$targetVersion
@rocket.chat/fuselage@
$targetVersion
@rocket.chat/fuselage-hooks@
$targetVersion
@rocket.chat/icons@
$targetVersion
@rocket.chat/logo@
$targetVersion
@rocket.chat/memo@
$targetVersion
@rocket.chat/message-parser@
$targetVersion
@rocket.chat/onboarding-ui@
$targetVersion
@rocket.chat/string-helpers@
$targetVersion
@rocket.chat/ui-kit@
$targetVersion
@rocket.chat/layout@
$targetVersion
@rocket.chat/message-parser@
$targetVersion
"
exit
1
fi
if
[[
$action
!=
"undo"
]]
;
then
echo
"linking local project"
else
echo
"unlinking local project"
if
[[
$action
==
"next"
||
$action
==
"latest"
]]
;
then
for
i
in
$(
echo
$packages
|
tr
";"
"
\n
"
)
;
do
echo
"Updating
$i
package to @rocket.chat/
$i
@
$action
..."
eval
"yarn up @rocket.chat/
$i
@
$action
"
done
exit
1
fi
cd
./node_modules/@rocket.chat
cd
./node_modules/@rocket.chat
for
i
in
$(
echo
$packages
|
tr
";"
"
\n
"
)
do
for
i
in
$(
echo
$packages
|
tr
";"
"
\n
"
)
;
do
rm
-rf
$i
if
[[
$action
!=
"undo"
]]
;
then
if
[[
$action
!=
"undo"
&&
$action
!=
"unlink"
]]
;
then
ln
-s
"../../../fuselage/packages/
$i
"
$i
echo
"root
$i
"
fi
done
done
cd
../..
cd
./apps/meteor/node_modules/@rocket.chat
for
i
in
$(
echo
$packages
|
tr
";"
"
\n
"
)
do
rm
-rf
$i
if
[[
$action
!=
"undo"
]]
;
then
rm
-rf
$i
for
i
in
$(
echo
$packages
|
tr
";"
"
\n
"
)
;
do
if
[[
$action
!=
"undo"
&&
$action
!=
"unlink"
]]
;
then
echo
"Linking @rocket.chat/
$i
package to local project ..."
rm
-rf
$i
ln
-s
"../../../../../fuselage/packages/
$i
"
$i
echo
"Local package @rocket.chat/
$i
linked successfully"
else
echo
"Unlinking @rocket.chat/
$i
package to local project ..."
rm
-rf
$i
echo
"Local package @rocket.chat/
$i
was unlinked successfully"
fi
done
if
[[
$action
!=
"undo"
]]
;
then
echo
"linking local project"
for
i
in
$(
echo
$packages
|
tr
";"
"
\n
"
)
do
ln
-s
"../../../../../fuselage/packages/
$i
"
$i
echo
"apps/meteor
$i
"
done
fi
done
cd
../../../../
if
[[
$action
==
"undo"
]]
;
then
if
[[
$action
==
"undo"
||
$action
==
"unlink"
]]
;
then
yarn
fi
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment