Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/master' into merge-upstream
Browse files Browse the repository at this point in the history
  • Loading branch information
richard-cox committed Jul 9, 2020
2 parents 14479c5 + e457a61 commit a19f2c4
Show file tree
Hide file tree
Showing 15 changed files with 426 additions and 130 deletions.
28 changes: 28 additions & 0 deletions build/clean-symlinks.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
#!/usr/bin/env bash

# Clean any symlinks from a pre 4.0 Stratos
# These are no longer used for customization and need to be removed

set -euo pipefail

# Script folder
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null && pwd )"
STRATOS="`cd "${DIR}/..";pwd`"

function processFile {
filename=$1
if [ -L "$filename" ]; then
echo Removing symlink $filename
rm $filename
fi
}

function processFolder {
for filename in $1; do
processFile $filename
done
}

processFolder "${STRATOS}/src/frontend/packages/core/sass/*.*"
processFolder "${STRATOS}/src/frontend/packages/core/assets/*.*"
processFile "${STRATOS}/src/frontend/packages/core/favicon.ico"
26 changes: 25 additions & 1 deletion build/tools/changelog.sh
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,14 @@ function search() {
curl -s "https://api.github.com/search/issues?q=${QUERY}${FILTER}" | jq -r '.items | .[] | "- \(.title) [\\#\(.number)](\(.html_url))"' | tee -a ${CHANGELOG}
}

function breaking_changes() {
FILTER=$1
if [ -n "${FORK_QUERY}" ]; then
curl -s "https://api.github.com/search/issues?q=${FORK_QUERY}${FILTER}" | jq -r '.items | .[] | "- **\(.title)**\n\n \(.body)"' > ${CHANGELOG}.breaking
fi
curl -s "https://api.github.com/search/issues?q=${QUERY}${FILTER}" | jq -r '.items | .[] | "- **\(.title)**\n\n \(.body)"' > ${CHANGELOG}.breaking
}

function log() {
echo $1 | tee -a ${CHANGELOG}
}
Expand All @@ -75,7 +83,8 @@ if [ -n "${FORK}" ]; then
fi

BUGS="+label:bug"
NON_BUGS="+-label:bug"
NON_BUGS="+-label:bug+-label:breaking-change"
BREAKING_CHANGES="+label:breaking-change"

mv ${CHANGELOG} CHANGELOG.old

Expand Down Expand Up @@ -104,6 +113,21 @@ search $BUGS

log ""

rm -f ${CHANGELOG}.breaking

breaking_changes $BREAKING_CHANGES

SIZE=$(wc -c ${CHANGELOG}.breaking | awk '{print $1}')
if [ "$SIZE" -ne 0 ]; then
log "**Breaking Changes:**"
log ""
cat ${CHANGELOG}.breaking | tee -a ${CHANGELOG}
fi

rm -f ${CHANGELOG}.breaking

log ""

tail -n +2 CHANGELOG.old >> ${CHANGELOG}
rm CHANGELOG.old

Expand Down
2 changes: 1 addition & 1 deletion docs/customizing.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ To aid in migrating we've provided these instructions.
1) Check that your ts config file defines the public api file.
- `src/tsconfig.json` file's `compilerOptions/paths` section should contain something like `"@custom/extensions": ["frontend/packages/custom_extensions/src/public-api.ts"]`.
1) Check that your new package's package.json defines your custom module and if application custom-routing module.
- See `src/frontend/packages/custom_extensions/package.json` file's `stratos` section.
- See `src/frontend/packages/suse_extensions/package.json` file's `stratos` section.
- Note your `routingModule` entry label should not have a preceding `_`.
1) Build Stratos in your usual way, for instance `npm run build`.
- It could be that this fails due to TypeScript import issues, if so go through these and fix.
Expand Down
Loading

0 comments on commit a19f2c4

Please sign in to comment.