mirror of
https://github.com/balena-io/etcher.git
synced 2025-04-24 15:27:17 +00:00
chore: only ignore top level directories in gitignore for some cases (#1588)
We accidentally added build/ to gitignore, causing any new files from `scripts/build` to be ignored. See: https://github.com/resin-io/etcher/pull/1547#discussion_r126790010 Signed-off-by: Juan Cruz Viotti <jv@jviotti.com>
This commit is contained in:
parent
ca9136d1cb
commit
ff547035be
13
.gitignore
vendored
13
.gitignore
vendored
@ -1,5 +1,5 @@
|
||||
# Logs
|
||||
logs
|
||||
/logs
|
||||
*.log
|
||||
npm-debug.log*
|
||||
|
||||
@ -9,10 +9,10 @@ pids
|
||||
*.seed
|
||||
|
||||
# Directory for instrumented libs generated by jscoverage/JSCover
|
||||
lib-cov
|
||||
/lib-cov
|
||||
|
||||
# Coverage directory used by tools like istanbul
|
||||
coverage
|
||||
/coverage
|
||||
|
||||
# Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files)
|
||||
.grunt
|
||||
@ -21,15 +21,14 @@ coverage
|
||||
.lock-wscript
|
||||
|
||||
# Compiled binary addons (http://nodejs.org/api/addons.html)
|
||||
build
|
||||
/build
|
||||
|
||||
# Dependency directory
|
||||
# https://docs.npmjs.com/misc/faq#should-i-check-my-node-modules-folder-into-git
|
||||
node_modules
|
||||
bower_components
|
||||
|
||||
# Compiled Electron releases
|
||||
dist
|
||||
# Compiled Etcher releases
|
||||
/dist
|
||||
|
||||
# Certificates
|
||||
*.spc
|
||||
|
67
scripts/build/target-convert.sh
Executable file
67
scripts/build/target-convert.sh
Executable file
@ -0,0 +1,67 @@
|
||||
#!/bin/bash
|
||||
|
||||
###
|
||||
# Copyright 2017 resin.io
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
###
|
||||
|
||||
set -e
|
||||
set -u
|
||||
|
||||
function usage() {
|
||||
echo "Usage: $0"
|
||||
echo ""
|
||||
echo "Options"
|
||||
echo ""
|
||||
echo " -r <target>"
|
||||
echo " -t <type (pkg)>"
|
||||
exit 1
|
||||
}
|
||||
|
||||
ARGV_TARGET=""
|
||||
ARGV_TYPE=""
|
||||
|
||||
while getopts ":r:t:" option; do
|
||||
case $option in
|
||||
r) ARGV_TARGET=$OPTARG ;;
|
||||
t) ARGV_TYPE=$OPTARG ;;
|
||||
*) usage ;;
|
||||
esac
|
||||
done
|
||||
|
||||
if [ -z "$ARGV_TARGET" ] || [ -z "$ARGV_TYPE" ]; then
|
||||
usage
|
||||
fi
|
||||
|
||||
RESULT=""
|
||||
|
||||
if [ "$ARGV_TYPE" == "pkg" ]; then
|
||||
if [ "$ARGV_TARGET" == "linux" ]; then
|
||||
RESULT=linux
|
||||
elif [ "$ARGV_ARCHITECTURE" == "win32" ]; then
|
||||
RESULT=win
|
||||
elif [ "$ARGV_ARCHITECTURE" == "darwin" ]; then
|
||||
RESULT=macos
|
||||
fi
|
||||
else
|
||||
echo "Unsupported target type: $ARGV_TYPE" 1>&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [ -z "$RESULT" ]; then
|
||||
echo "Unsupported target: $ARGV_TARGET" 1>&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
echo "$RESULT"
|
Loading…
x
Reference in New Issue
Block a user