Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Bootstrap
bootstrap
Commits
f4051abc
Commit
f4051abc
authored
7 years ago
by
Léo Andrès
Committed by
XhmikosR
7 years ago
Browse files
Options
Download
Email Patches
Plain Diff
Clean shell scripts (#25704)
parent
6d7d91ef
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
build/ship.sh
+28
-28
build/ship.sh
build/upload-preview.sh
+1
-1
build/upload-preview.sh
with
29 additions
and
29 deletions
+29
-29
build/ship.sh
+
28
-
28
View file @
f4051abc
...
@@ -9,62 +9,62 @@
...
@@ -9,62 +9,62 @@
red
=
$'
\e
[1;31m'
red
=
$'
\e
[1;31m'
green
=
$'
\e
[1;32m'
green
=
$'
\e
[1;32m'
blue
=
$'
\e
[1;34m'
#
blue=$'\e[1;34m'
magenta
=
$'
\e
[1;35m'
magenta
=
$'
\e
[1;35m'
cyan
=
$'
\e
[1;36m'
#
cyan=$'\e[1;36m'
end
=
$'
\e
[0m'
end
=
$'
\e
[0m'
# Get current version from package.json
# Get current version from package.json
current_version
=
$(
node
-p
"require('./package.json').version"
)
current_version
=
$(
node
-p
"require('./package.json').version"
)
if
[[
$#
-lt
1
]]
;
then
if
[[
$#
-lt
1
]]
;
then
printf
"
\n
${
red
}
⚠️ Shipping aborted. You must specify a version.
\n
$
{
end
}
"
printf
"
\n
%s
⚠️ Shipping aborted. You must specify a version.
\n
%s"
$red
$end
exit
1
exit
1
fi
fi
# Pulling latest changes, just to be sure
# Pulling latest changes, just to be sure
printf
"
\n
${
magenta
}
=======================================================
$
{
end
}
"
printf
"
\n
%s
=======================================================
%s"
$magenta
$end
printf
"
\n
${
magenta
}
Pulling latest changes...
$
{
end
}
"
printf
"
\n
%s
Pulling latest changes...
%s"
$magenta
$end
printf
"
\n
${
magenta
}
=======================================================
\n\n
$
{
end
}
"
printf
"
\n
%s
=======================================================
\n\n
%s"
$magenta
$end
git pull origin v4-dev
git pull origin v4-dev
# Update version number
# Update version number
printf
"
\n
${
magenta
}
=======================================================
$
{
end
}
"
printf
"
\n
%s
=======================================================
%s"
$magenta
$end
printf
"
\n
${
magenta
}
Updating version number...
$
{
end
}
"
printf
"
\n
%s
Updating version number...
%s"
$magenta
$end
printf
"
\n
${
magenta
}
=======================================================
\n
$
{
end
}
"
printf
"
\n
%s
=======================================================
\n
%s"
$magenta
$end
npm run release-version
$current_version
$1
npm run release-version
"
$current_version
"
"
$1
"
# Compile latest CSS and JS
# Compile latest CSS and JS
printf
"
\n
${
magenta
}
=======================================================
$
{
end
}
"
printf
"
\n
%s
=======================================================
%s"
$magenta
$end
printf
"
\n
${
magenta
}
Compile latest CSS and JS...
$
{
end
}
"
printf
"
\n
%s
Compile latest CSS and JS...
%s"
$magenta
$end
printf
"
\n
${
magenta
}
=======================================================
\n
$
{
end
}
"
printf
"
\n
%s
=======================================================
\n
%s"
$magenta
$end
npm run dist
npm run dist
# Generate the SRI hashes
# Generate the SRI hashes
printf
"
\n
${
magenta
}
=======================================================
$
{
end
}
"
printf
"
\n
%s
=======================================================
%s"
$magenta
$end
printf
"
\n
${
magenta
}
Generate the SRI hashes...
$
{
end
}
"
printf
"
\n
%s
Generate the SRI hashes...
%s"
$magenta
$end
printf
"
\n
${
magenta
}
=======================================================
\n
$
{
end
}
"
printf
"
\n
%s
=======================================================
\n
%s"
$magenta
$end
npm run release-sri
npm run release-sri
# Compress the dist files
# Compress the dist files
printf
"
\n
${
magenta
}
=======================================================
$
{
end
}
"
printf
"
\n
%s
=======================================================
%s"
$magenta
$end
printf
"
\n
${
magenta
}
Compressing the dist files...
$
{
end
}
"
printf
"
\n
%s
Compressing the dist files...
%s"
$magenta
$end
printf
"
\n
${
magenta
}
=======================================================
\n
$
{
end
}
"
printf
"
\n
%s
=======================================================
\n
%s"
$magenta
$end
npm run release-zip
npm run release-zip
# Compile the docs
# Compile the docs
printf
"
\n
${
magenta
}
=======================================================
$
{
end
}
"
printf
"
\n
%s
=======================================================
%s"
$magenta
$end
printf
"
\n
${
magenta
}
Compile hosted documentation...
$
{
end
}
"
printf
"
\n
%s
Compile hosted documentation...
%s"
$magenta
$end
printf
"
\n
${
magenta
}
=======================================================
\n
$
{
end
}
"
printf
"
\n
%s
=======================================================
\n
%s"
$magenta
$end
npm run docs-github
npm run docs-github
# Copy the contents of the built docs site over to `bs-docs` repo
# Copy the contents of the built docs site over to `bs-docs` repo
printf
"
\n
${
magenta
}
=======================================================
$
{
end
}
"
printf
"
\n
%s
=======================================================
%s"
$magenta
$end
printf
"
\n
${
magenta
}
Copy it over...
$
{
end
}
"
printf
"
\n
%s
Copy it over...
%s"
$magenta
$end
printf
"
\n
${
magenta
}
=======================================================
\n
$
{
end
}
"
printf
"
\n
%s
=======================================================
\n
%s"
$magenta
$end
cp
-rf
_gh_pages/. ../bs-docs/
cp
-rf
_gh_pages/. ../bs-docs/
printf
"
\n
Done!
\n
"
printf
"
\n
Done!
\n
"
printf
"
\n
${
green
}
=======================================================
$
{
end
}
"
printf
"
\n
%s
=======================================================
%s"
$green
$end
printf
"
\n
${
green
}
Success,
$1
is ready to review and publish.
$
{
end
}
"
printf
"
\n
%s
Success,
$1
is ready to review and publish.
%s"
$green
$end
printf
"
\n
${
green
}
=======================================================
\n\n
$
{
end
}
"
printf
"
\n
%s
=======================================================
\n\n
%s"
$green
$end
This diff is collapsed.
Click to expand it.
build/upload-preview.sh
+
1
-
1
View file @
f4051abc
...
@@ -5,7 +5,7 @@
...
@@ -5,7 +5,7 @@
sed
-i
"/^current_version:/ s/
\$
/+pr.
${
TRAVIS_COMMIT
}
/"
_config.yml
sed
-i
"/^current_version:/ s/
\$
/+pr.
${
TRAVIS_COMMIT
}
/"
_config.yml
bundle
exec
jekyll build
--destination
"
$TRAVIS_COMMIT
"
--baseurl
"/c/
${
TRAVIS_COMMIT
}
"
bundle
exec
jekyll build
--destination
"
$TRAVIS_COMMIT
"
--baseurl
"/c/
${
TRAVIS_COMMIT
}
"
openssl aes-256-cbc
-K
$
encrypted_2b749c8e6327_key
-iv
$
encrypted_2b749c8e6327_iv
-in
build/gcp-key.json.enc
-out
build/gcp-key.json
-d
openssl aes-256-cbc
-K
"
${
encrypted_2b749c8e6327_key
:?
}
"
-iv
"
${
encrypted_2b749c8e6327_iv
:?
}
"
-in
build/gcp-key.json.enc
-out
build/gcp-key.json
-d
gcloud auth activate-service-account
"
$GCP_SERVICE_ACCOUNT
"
--key-file
build/gcp-key.json &> /dev/null
||
(
echo
'GCP login failed!'
;
exit
1
)
gcloud auth activate-service-account
"
$GCP_SERVICE_ACCOUNT
"
--key-file
build/gcp-key.json &> /dev/null
||
(
echo
'GCP login failed!'
;
exit
1
)
echo
"Uploading to http://preview.twbsapps.com/c/
${
TRAVIS_COMMIT
}
..."
echo
"Uploading to http://preview.twbsapps.com/c/
${
TRAVIS_COMMIT
}
..."
...
...
This diff is collapsed.
Click to expand it.
Write
Preview
Supports
Markdown
0%
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!
Cancel
Please
register
or
sign in
to comment