initial import
This commit is contained in:
16
static/bower_components/seiyria-bootstrap-slider/scripts/build-preview.sh
vendored
Normal file
16
static/bower_components/seiyria-bootstrap-slider/scripts/build-preview.sh
vendored
Normal file
@@ -0,0 +1,16 @@
|
||||
#!/bin/bash
|
||||
|
||||
# this is run by netlify. there is no need to run this manually.
|
||||
|
||||
# log
|
||||
# Generate index.html and /temp assets for GH Pages branch
|
||||
npm i
|
||||
grunt build
|
||||
grunt build-gh-pages
|
||||
|
||||
mkdir css
|
||||
mkdir js
|
||||
|
||||
cp node_modules/bootstrap/dist/css/bootstrap.min.css css/bootstrap.min.css
|
||||
mv temp/bootstrap-slider.css css/bootstrap-slider.css
|
||||
mv temp/bootstrap-slider.js js/bootstrap-slider.js
|
||||
53
static/bower_components/seiyria-bootstrap-slider/scripts/release.sh
vendored
Normal file
53
static/bower_components/seiyria-bootstrap-slider/scripts/release.sh
vendored
Normal file
@@ -0,0 +1,53 @@
|
||||
#!/bin/bash
|
||||
|
||||
# Check if required CLI tools are available
|
||||
if ! [ -x "$(command -v grunt)" ]; then
|
||||
echo "Error: grunt-cli is not installed. Please type 'npm install grunt-cli -g' to install" >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Validate arguments
|
||||
versionBumpType=${1:-patch};
|
||||
|
||||
if [ "$versionBumpType" != "major" ] && [ "$versionBumpType" != "minor" ] && [ "$versionBumpType" != "patch" ]; then
|
||||
echo "Invalid version bump argument: ${versionBumpType}. Option must be one of the following: major, minor, patch" >&2
|
||||
exit 1
|
||||
else
|
||||
echo "Publishing and bumping with ${versionBumpType} version bump"
|
||||
fi
|
||||
|
||||
echo "Running version bump + publish script..."
|
||||
echo "."
|
||||
echo "."
|
||||
echo "Generating /dist and push changes + tags to Github remote 'origin'"
|
||||
# Checkout master branch
|
||||
git checkout master
|
||||
# Version bump
|
||||
grunt bump-only:"$versionBumpType"
|
||||
# Generate new dist
|
||||
grunt prod
|
||||
# Generate new index.html page
|
||||
grunt template
|
||||
# Force add dist contents
|
||||
git add dist/* --force
|
||||
# Commit new release tag
|
||||
grunt bump-commit
|
||||
# Push commits/tags to master branch on remote 'origin'
|
||||
git push origin master:master && git push --tags
|
||||
|
||||
## Update Github.io page
|
||||
sh ./scripts/update-gh-pages.sh
|
||||
|
||||
## Publish to NPM
|
||||
echo "."
|
||||
echo "."
|
||||
echo "Publishing to NPM"
|
||||
echo "."
|
||||
echo "."
|
||||
npm publish
|
||||
|
||||
# Notify script is complete
|
||||
echo "."
|
||||
echo "."
|
||||
echo "Script complete"
|
||||
echo ""
|
||||
32
static/bower_components/seiyria-bootstrap-slider/scripts/update-gh-pages.sh
vendored
Normal file
32
static/bower_components/seiyria-bootstrap-slider/scripts/update-gh-pages.sh
vendored
Normal file
@@ -0,0 +1,32 @@
|
||||
#!/bin/bash
|
||||
|
||||
# log
|
||||
echo "..."
|
||||
echo "Updating Github.io page"
|
||||
echo "..."
|
||||
# Generate index.html and /temp assets for GH Pages branch
|
||||
grunt build-gh-pages
|
||||
# Create temporary copy of index file
|
||||
cp index.html index-temp.html
|
||||
# Checkout to `gh-pages` branch
|
||||
git checkout -B gh-pages origin/gh-pages
|
||||
git pull -r origin gh-pages
|
||||
# Replace current files with temporary files
|
||||
mv index-temp.html index.html
|
||||
cp node_modules/bootstrap/dist/css/bootstrap.min.css css/bootstrap.min.css
|
||||
mv temp/bootstrap-slider.css css/bootstrap-slider.css
|
||||
mv temp/bootstrap-slider.js js/bootstrap-slider.js
|
||||
# Remove /temp directory
|
||||
rm -rf temp
|
||||
# Stage new files for commit
|
||||
git add index.html css/bootstrap-slider.css js/bootstrap-slider.js css/bootstrap.min.css
|
||||
# Create commit with new files
|
||||
git commit -m "updates"
|
||||
# Push new source code to gh-pages branch
|
||||
git push origin gh-pages:gh-pages -f
|
||||
# Switch back to master branch
|
||||
git checkout master
|
||||
# log
|
||||
echo "..."
|
||||
echo "Github.io page updated"
|
||||
echo "..."
|
||||
Reference in New Issue
Block a user