Skip to content

Commit

Permalink
Merge branch 'main' into sam/disable-on-demand-when-user-initiates-sh…
Browse files Browse the repository at this point in the history
…utdown

# By Dax the Duck (9) and others
# Via GitHub (6) and others
* main: (47 commits)
  Update BSK to 141.1.1 (#2713)
  macOS: VPN Metadata Improvements (#2704)
  duck page suggestions (#2666)
  macOS: Add pixels to track VPN wake and stop attempts (#2694)
  Trusted url indicator (#2665)
  remove Tab.TabContent.url (#2647)
  Bump version to 1.85.0 (176)
  Update release automation to support Privacy Pro section in release notes (#2710)
  Fix for VPN stop issues. (#2689)
  Hard-codes the VPN waitlist flags to ON (#2709)
  Add subscription status to the macOS metadata (#2680)
  Bump version to 1.85.0 (175)
  Call finish in the correct place (#2702)
  Fix layout issue on DBP (#2700)
  Update autoconsent to v10.6.1 (#2618)
  Make Clear All History shortcut available without entering Main Menu (#2682)
  Fix DataBrokerProtectionProcessor.swift lint
  Fix SwiftLint
  Add parameter allowed encoding to error descriptions (#2691)
  Remove debug flags
  ...

# Conflicts:
#	DuckDuckGo.xcodeproj/project.pbxproj
#	DuckDuckGo.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved
  • Loading branch information
samsymons committed Apr 26, 2024
2 parents 63b1a73 + e965388 commit 7ac9131
Show file tree
Hide file tree
Showing 205 changed files with 5,598 additions and 2,590 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/bump_internal_release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -118,10 +118,10 @@ jobs:
curl -fLSs "https://app.asana.com/api/1.0/tasks/${TASK_ID}?opt_fields=notes" \
-H "Authorization: Bearer ${ASANA_ACCESS_TOKEN}" \
| jq -r .data.notes \
| ./scripts/extract_release_notes.sh > release_notes.txt
release_notes="$(<release_notes.txt)"
if [[ ${#release_notes} == 0 || "$release_notes" == "<-- Add release notes here -->" ]]; then
echo "::error::Release notes are empty. Please add release notes to the Asana task and restart the workflow."
| ./scripts/extract_release_notes.sh -r > raw_release_notes.txt
raw_release_notes="$(<raw_release_notes.txt)"
if [[ ${#raw_release_notes} == 0 || "$raw_release_notes" == *"<-- Add release notes here -->"* ]]; then
echo "::error::Release notes are empty or contain a placeholder. Please add release notes to the Asana task and restart the workflow."
exit 1
fi
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/code_freeze.yml
Original file line number Diff line number Diff line change
Expand Up @@ -172,6 +172,7 @@ jobs:
uses: ./.github/workflows/tag_release.yml
with:
asana-task-url: ${{ needs.create_release_branch.outputs.asana_task_url }}
base-branch: ${{ github.ref_name }}
branch: ${{ needs.create_release_branch.outputs.release_branch_name }}
prerelease: true
secrets:
Expand Down
24 changes: 19 additions & 5 deletions .github/workflows/create_variant.yml
Original file line number Diff line number Diff line change
Expand Up @@ -86,14 +86,28 @@ jobs:
.github
scripts
- name: Download DMG artifact
id: download-dmg-artifact
continue-on-error: true
uses: actions/download-artifact@v4
with:
name: duckduckgo-dmg
path: ${{ github.workspace }}

- name: Download release app
# Download the release app only if download-dmg-artifact fails
if: ${{ steps.download-dmg-artifact.outcome == 'failure' }}
run: |
curl -fLSs "${{ vars.RELEASE_DMG_URL }}" --output duckduckgo.dmg
hdiutil attach duckduckgo.dmg -mountpoint vanilla
mkdir -p dmg
cp -R vanilla/DuckDuckGo.app dmg/DuckDuckGo.app
hdiutil detach vanilla
rm -f duckduckgo.dmg
- name: Extract App from DMG
id: extract-app-from-dmg
run: |
hdiutil attach duckduckgo.dmg -mountpoint vanilla
mkdir -p dmg
cp -R vanilla/DuckDuckGo.app dmg/DuckDuckGo.app
hdiutil detach vanilla
rm -f duckduckgo.dmg
- name: Install create-dmg
run: brew install create-dmg
Expand Down
22 changes: 20 additions & 2 deletions .github/workflows/create_variants.yml
Original file line number Diff line number Diff line change
Expand Up @@ -72,11 +72,29 @@ jobs:
atb-asana-task-id: ${{ vars.DMG_VARIANTS_LIST_TASK_ID }}
origin-asana-section-id: ${{ vars.DMG_VARIANTS_ORIGIN_SECTION_ID }}


download-dmg-and-upload-artifact:

name: Download Release App and upload artifact

runs-on: macos-13
timeout-minutes: 15

steps:
- name: Download release app
run: |
curl -fLSs "${{ vars.RELEASE_DMG_URL }}" --output duckduckgo.dmg
- name: Upload DMG artifact
uses: actions/upload-artifact@v4
with:
name: duckduckgo-dmg
path: ${{ github.workspace }}/duckduckgo.dmg
retention-days: 1

create-variants:

name: Create Variant
needs: set-up-variants
needs: [set-up-variants, download-dmg-and-upload-artifact]

strategy:
fail-fast: false
Expand Down
34 changes: 32 additions & 2 deletions .github/workflows/pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,36 @@ jobs:
env:
SHELLCHECK_OPTS: -x -P scripts -P scripts/helpers

bats:

name: Test Shell Scripts

runs-on: macos-13

steps:
- name: Check out the code
if: github.event_name == 'pull_request' || github.event_name == 'push'
uses: actions/checkout@v4

- name: Check out the code
if: github.event_name != 'pull_request' && github.event_name != 'push'
uses: actions/checkout@v4
with:
ref: ${{ inputs.branch || github.ref_name }}

- name: Install Bats
run: brew install bats-core

- name: Run Bats tests
run: bats --formatter junit scripts/tests/* > bats-tests.xml

- name: Publish unit tests report
uses: mikepenz/action-junit-report@v3
if: always() # always run even if the previous step fails
with:
check_name: "Test Report: Shell Scripts"
report_paths: 'bats-tests.xml'

tests:
name: Test

Expand Down Expand Up @@ -343,7 +373,7 @@ jobs:
create-asana-task:
name: Create Asana Task
needs: [swiftlint, tests, release-build, verify-autoconsent-bundle, private-api]
needs: [swiftlint, bats, tests, release-build, verify-autoconsent-bundle, private-api]

if: failure() && github.ref_name == 'main' && github.run_attempt == 1

Expand All @@ -360,7 +390,7 @@ jobs:

close-asana-task:
name: Close Asana Task
needs: [swiftlint, tests, release-build, verify-autoconsent-bundle, private-api]
needs: [swiftlint, bats, tests, release-build, verify-autoconsent-bundle, private-api]

if: success() && github.ref_name == 'main' && github.run_attempt > 1

Expand Down
18 changes: 9 additions & 9 deletions .github/workflows/publish_dmg_release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -145,14 +145,14 @@ jobs:
run: |
curl -fLSs "https://app.asana.com/api/1.0/tasks/${TASK_ID}?opt_fields=notes" \
-H "Authorization: Bearer ${ASANA_ACCESS_TOKEN}" \
| jq -r .data.notes \
| ./scripts/extract_release_notes.sh > release_notes.txt
release_notes="$(<release_notes.txt)"
if [[ ${#release_notes} == 0 || "$release_notes" == "<-- Add release notes here -->" ]]; then
echo "::error::Release notes are empty. Please add release notes to the Asana task and restart the workflow."
| jq -r .data.notes > release_task_content.txt
raw_release_notes="$(./scripts/extract_release_notes.sh -r < release_task_content.txt)"
if [[ ${#raw_release_notes} == 0 || "$raw_release_notes" == *"<-- Add release notes here -->"* ]]; then
echo "::error::Release notes are empty or contain a placeholder. Please add release notes to the Asana task and restart the workflow."
exit 1
fi
echo "RELEASE_NOTES_FILE=release_notes.txt" >> $GITHUB_ENV
./scripts/extract_release_notes.sh < release_task_content.txt > release_notes.html
echo "RELEASE_NOTES_FILE=release_notes.html" >> $GITHUB_ENV
- name: Set up Sparkle tools
env:
Expand Down Expand Up @@ -189,21 +189,21 @@ jobs:
./scripts/appcast_manager/appcastManager.swift \
--release-to-internal-channel \
--dmg ${DMG_PATH} \
--release-notes release_notes.txt \
--release-notes-html release_notes.html \
--key sparkle_private_key
;;
"public")
./scripts/appcast_manager/appcastManager.swift \
--release-to-public-channel \
--version ${VERSION} \
--release-notes release_notes.txt \
--release-notes-html release_notes.html \
--key sparkle_private_key
;;
"hotfix")
./scripts/appcast_manager/appcastManager.swift \
--release-hotfix-to-public-channel \
--dmg ${DMG_PATH} \
--release-notes release_notes.txt \
--release-notes-html release_notes.html \
--key sparkle_private_key
;;
*)
Expand Down
2 changes: 1 addition & 1 deletion Configuration/BuildNumber.xcconfig
Original file line number Diff line number Diff line change
@@ -1 +1 @@
CURRENT_PROJECT_VERSION = 169
CURRENT_PROJECT_VERSION = 176
2 changes: 1 addition & 1 deletion Configuration/Version.xcconfig
Original file line number Diff line number Diff line change
@@ -1 +1 @@
MARKETING_VERSION = 1.84.0
MARKETING_VERSION = 1.85.0
Loading

0 comments on commit 7ac9131

Please sign in to comment.