Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Roman Haefeli
netpd-app-builder
Commits
73b22259
Commit
73b22259
authored
Jan 28, 2022
by
Roman Haefeli
Browse files
build_macos: add --skip-upload flag
parent
07c0848e
Changes
1
Hide whitespace changes
Inline
Side-by-side
build_macos.sh
View file @
73b22259
#!/bin/bash
#!/bin/bash
SKIP_UPLOAD
=
false
POSITIONAL_ARGS
=()
while
[[
$#
-gt
0
]]
;
do
case
$1
in
-k
|
--skip-upload
)
SKIP_UPLOAD
=
true
shift
;;
-
*
|
--
*
)
echo
"Unknown option
$1
"
exit
1
;;
*
)
POSITIONAL_ARGS+
=(
"
$1
"
)
# save positional arg
shift
# past argument
;;
esac
done
app_name
=
"netpd"
app_name
=
"netpd"
package_version
=
$(
date
+%Y-%m-%d
)
package_version
=
$(
date
+%Y-%m-%d
)
src_url
=
"https://github.com/reduzent/netpd"
src_url
=
"https://github.com/reduzent/netpd"
...
@@ -93,15 +114,20 @@ s/{BUNDLE_VERSION}/${app_version}/
...
@@ -93,15 +114,20 @@ s/{BUNDLE_VERSION}/${app_version}/
dmg
"
${
app_name
}
-
${
app_version
}
-macos-
${
package_version
}
.iso"
"
${
app_name
}
-
${
app_version
}
-macos-
${
package_version
}
.dmg"
||
fail
dmg
"
${
app_name
}
-
${
app_version
}
-macos-
${
package_version
}
.iso"
"
${
app_name
}
-
${
app_version
}
-macos-
${
package_version
}
.dmg"
||
fail
rm
"
${
app_name
}
-
${
app_version
}
-macos-
${
package_version
}
.iso"
||
fail
rm
"
${
app_name
}
-
${
app_version
}
-macos-
${
package_version
}
.iso"
||
fail
# put file online
if
$SKIP_UPLOAD
;
then
scp
-q
"
${
app_name
}
-
${
app_version
}
-macos-
${
package_version
}
.dmg"
"all@netpd.org:public_html/software/"
||
fail
# clean up workdir only
rm
-r
"
${
work_dir
}
"
||
fail
else
# put file online
scp
-q
"
${
app_name
}
-
${
app_version
}
-macos-
${
package_version
}
.dmg"
"all@netpd.org:public_html/software/"
||
fail
# clean up
# clean up
rm
-r
"
${
work_dir
}
"
"
${
app_name
}
-
${
app_version
}
-macos-
${
package_version
}
.dmg"
||
fail
rm
-r
"
${
work_dir
}
"
"
${
app_name
}
-
${
app_version
}
-macos-
${
package_version
}
.dmg"
||
fail
# create short cut
# create short cut
ssh all@netpd.org
ln
-f
-s
"
${
app_name
}
-
${
app_version
}
-macos-
${
package_version
}
.dmg"
"public_html/software/
${
app_name
}
-
${
app_version
}
-macos.dmg"
||
fail
ssh all@netpd.org
ln
-f
-s
"
${
app_name
}
-
${
app_version
}
-macos-
${
package_version
}
.dmg"
"public_html/software/
${
app_name
}
-
${
app_version
}
-macos.dmg"
||
fail
# update redirect target in .htaccess
# update redirect target in .htaccess
ssh all@netpd.org
sed
-i
"2s/[0-9]
\.
[0-9]
\.
[0-9]/
${
app_version
}
/"
public_html/software/.htaccess
||
fail
ssh all@netpd.org
sed
-i
"2s/[0-9]
\.
[0-9]
\.
[0-9]/
${
app_version
}
/"
public_html/software/.htaccess
||
fail
fi
)
)
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a 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